-
Notifications
You must be signed in to change notification settings - Fork 204
/
FunctionsLibrary.cs
98 lines (75 loc) · 2.01 KB
/
FunctionsLibrary.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#region Copyright Syncfusion Inc. 2001-2024.
// Copyright Syncfusion Inc. 2001-2024. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// [email protected]. Any infringement will be prosecuted under
// applicable laws.
#endregion
using System;
using System.Collections.Generic;
using UIKit;
using CoreGraphics;
using Foundation;
using CoreAnimation;
using Syncfusion.Calculate;
namespace SampleBrowser
{
public partial class FunctionsLibrary : SampleView
{
#region Fields
FunctionsLibraryView functionsLibraryView;
#endregion
#region Constructor
public FunctionsLibrary ()
{
functionsLibraryView = new FunctionsLibraryView();
this.AddSubview (functionsLibraryView);
}
#endregion
#region Methods
public override void LayoutSubviews ()
{
foreach (var view in this.Subviews) {
view.Frame = Bounds;
}
base.LayoutSubviews ();
}
protected override void Dispose (bool disposing)
{
functionsLibraryView.Dispose ();
base.Dispose (disposing);
}
#endregion
}
public class CalcData : ICalcData
{
public event ValueChangedEventHandler ValueChanged;
public CalcData()
{
}
Dictionary<string, object> values = new Dictionary<string, object>();
public object GetValueRowCol(int row, int col)
{
object value = null;
var key = RangeInfo.GetAlphaLabel(col) + row;
this.values.TryGetValue(key, out value);
return value;
}
public void SetValueRowCol(object value, int row, int col)
{
var key = RangeInfo.GetAlphaLabel(col) + row;
if (!values.ContainsKey(key))
values.Add(key, value);
else if (values.ContainsKey(key) && values[key] != value)
values[key] = value;
}
public void WireParentObject()
{
}
private void OnValueChanged(int row, int col, string value)
{
if (ValueChanged != null)
ValueChanged(this, new ValueChangedEventArgs(row, col, value));
}
}
}