本文整理汇总了C#中C1类的典型用法代码示例。如果您正苦于以下问题:C# C1类的具体用法?C# C1怎么用?C# C1使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
C1类属于命名空间,在下文中一共展示了C1类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: c1Upload1_ValidatingFile
protected void c1Upload1_ValidatingFile(object sender, C1.Web.Wijmo.Controls.C1Upload.ValidateFileEventArgs e)
{
if (e.IsValid)
this.TextBox1.Text += e.UploadedFile.FileName + Environment.NewLine;
else
this.TextBox2.Text += e.UploadedFile.FileName + Environment.NewLine;
}
示例2: grid_AutoGeneratingColumn
private void grid_AutoGeneratingColumn(object sender, C1.WPF.DataGrid.DataGridAutoGeneratingColumnEventArgs e)
{
if (e.Property.Name == "CountryId")
{
_colCountry.DisplayMemberPath = "Name";
_colCountry.SelectedValuePath = "Id";
_colCountry.SortMemberPath = "CountryId";
_colCountry.FilterMemberPath = "CountryId";
_colCountry.Header = "Country";
_colCountry.Binding = new Binding() { Path = new PropertyPath("CountryId"), Mode = BindingMode.TwoWay };
_colCountry.ItemsSource = Country.AllCountries;
e.Column = _colCountry;
}
else if (e.Property.Name == "RegionId")
{
_colRegion.DisplayMemberPath = "Name";
_colRegion.SelectedValuePath = "Id";
_colRegion.SortMemberPath = "RegionId";
_colRegion.FilterMemberPath = "RegionId";
_colRegion.Header = "Region";
_colRegion.Binding = new Binding() { Path = new PropertyPath("RegionId"), Mode = BindingMode.TwoWay };
_colRegion.ItemsSource = Region.AllRegions;
e.Column = _colRegion;
}
}
示例3: c1TrueDBGridTimeForAlarm_FetchRowStyle_1
private void c1TrueDBGridTimeForAlarm_FetchRowStyle_1(object sender, C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs e)
{
C1.Win.C1TrueDBGrid.C1TrueDBGrid tdbgrid = sender as C1.Win.C1TrueDBGrid.C1TrueDBGrid;
C1.Win.C1TrueDBGrid.Style S = new C1.Win.C1TrueDBGrid.Style();
Font myfont;
myfont = new Font(S.Font, FontStyle.Bold);
S.Font = myfont;
try
{
// Warning
if ((bool)tdbgrid[e.Row, "TimeWarningOn"] )
{
// tdbgrid.Columns["TimeWarningOn"].ValueItems.Translate = true;
// tdbgrid.Columns["TimeAlarmOn"].ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.Normal;
e.CellStyle.BackColor = System.Drawing.Color.Orange;
e.CellStyle.Alpha = 100;
}
// Alarm
if ((bool)tdbgrid[e.Row, "TimeAlarmOn"] )
{
e.CellStyle.BackColor = System.Drawing.Color.Red;
e.CellStyle.Alpha = 100;
// e.CellStyle.Font = myfont;
if (tdbgrid.Columns["TimeAlarmOn"].Caption == "TimeAlarmOn")
{
// tdbgrid.Columns["TimeAlarmOn"].ValueItems.Translate = true;
// tdbgrid.Columns["TimeAlarmOn"].ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.Normal;
// e.CellStyle.ForegroundImage = imageList1.Images[0];
}
}
}
catch { }
}
示例4: SetIndexesTests
public void SetIndexesTests()
{
dynamic mocks = new MockBuilder();
C1 key1 = new C1(), val1 = new C1();
C2 key2 = new C2(), val2 = new C2();
C1 key3 = null, val3 = null;
mocks[key1, 33] = val1;
mocks[key2, 55] = val2;
mocks[key3, 66] = val3;
mocks["hello"] = new { };
mocks["goodbye"] = 989898;
var copiled = COMPILER.Compile(typeof(SetIndexes));
var subject = (SetIndexes)
COMPILER.Compile(typeof(SetIndexes)).GetConstructors()[0]
.Invoke(new object[] { new ObjectBase(new DxSettings { TestForInvalidMocks = false }, mocks) });
Assert.AreEqual(subject.Get1(key1, 33), val1);
Assert.AreEqual(subject.Get1(key2, 55), val2);
Assert.AreEqual(subject.Get1(key3, 66), val3);
Assert.AreEqual(subject["goodbye"], 989898);
}
示例5: C1VectorLayer_UriSourceFailed
private void C1VectorLayer_UriSourceFailed(object sender, C1.WPF.Maps.C1VectorLayer.UriSourceFailedEventArgs e)
{
Dispatcher.BeginInvoke(new Action( () =>
{
txt.Text = "Can't load data";
}));
}
示例6: c1TrueDBGridTimeForAlarm_FetchCellStyle
private void c1TrueDBGridTimeForAlarm_FetchCellStyle(object sender, C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs e)
{
C1.Win.C1TrueDBGrid.C1TrueDBGrid tdbgrid = sender as C1.Win.C1TrueDBGrid.C1TrueDBGrid;
if ((bool)tdbgrid[e.Row, "TimeWarningOn"])
{
e.CellStyle.BackColor = System.Drawing.Color.Orange;
e.CellStyle.Alpha = 100;
// e.CellStyle.Font = myfont;
if (e.Col == 1 )
{
tdbgrid.Columns["TimeAlarmOn"].ValueItems.Translate = true;
tdbgrid.Columns["TimeAlarmOn"].ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.Normal;
e.CellStyle.ForegroundImage = imageList1.Images[1];
}
}
if ((bool)tdbgrid[e.Row, "TimeAlarmOn"])
{
e.CellStyle.BackColor = System.Drawing.Color.Red;
e.CellStyle.Alpha = 100;
// e.CellStyle.Font = myfont;
if ( e.Col==1)
{
tdbgrid.Columns["TimeAlarmOn"].ValueItems.Translate = true;
tdbgrid.Columns["TimeAlarmOn"].ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.Normal;
e.CellStyle.ForegroundImage = imageList1.Images[0];
}
}
}
示例7: ValidateExtension
private void ValidateExtension(C1.Web.Wijmo.Controls.C1Upload.ValidateFileEventArgs e, string ext)
{
if (e.IsValid) return;
if (string.Compare(e.UploadedFile.Extension, ext, true) == 0)
e.IsValid = true;
}
示例8: c1TrueDBGrid2_AfterColUpdate
private void c1TrueDBGrid2_AfterColUpdate(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)
{
// if (e.ColIndex == 0)
// {
AddItemsFromList();
// }
}
示例9: C1DataGrid_LoadedRowDetailsPresenter
private void C1DataGrid_LoadedRowDetailsPresenter(object sender, C1.Silverlight.DataGrid.DataGridRowDetailsEventArgs e)
{
if (userStatisticViewModel.SelectedQuizResult == null)
return;
e.DetailsElement.DataContext = new AnswersStatisticViewModel(
(e.Row.DataItem as MRZS.Web.Models.QuestionLog).Id,
userStatisticViewModel.SelectedQuizResult.EntityId);
}
示例10: ClearDataInGrid
public static void ClearDataInGrid(C1.Win.C1FlexGrid.C1FlexGrid i_fg)
{
if (i_fg.Rows.Count == i_fg.Rows.Fixed)
{
return;
}
i_fg.Rows.Count = i_fg.Rows.Fixed;
}
示例11: DataGridNumericColumn_FilterLoading
private void DataGridNumericColumn_FilterLoading(object sender, C1.WPF.DataGrid.DataGridFilterLoadingEventArgs e)
{
var filter = ((DataGridFilterList)((DataGridContentFilter)e.Filter).Content).Items[0] as DataGridHistogramFilter;
filter.SetBinding(DataGridHistogramFilter.ItemsSourceProperty, new Binding("ItemsSource")
{
Source = grid,
});
}
示例12: C1GridView1_SelectedIndexChanging
protected void C1GridView1_SelectedIndexChanging(object sender, C1.Web.Wijmo.Controls.C1GridView.C1GridViewSelectEventArgs e)
{
if (C1GridView1.SelectedRow != null)
{
string smbl = C1GridView1.Rows[e.NewSelectedIndex].Cells[2].Text;
ObjectDataSource2.SelectParameters["Symbol"].DefaultValue = smbl;
}
}
示例13: Tooltip1_OnAjaxUpdate
protected void Tooltip1_OnAjaxUpdate(C1.Web.Wijmo.Controls.C1ToolTip.C1ToolTipCallBackEventArgs e)
{
if (e.UpdatePanel != null)
{
Control c = e.UpdatePanel.FindControl("HyperLink1");
HyperLink1.Text = e.Source;
}
}
示例14: grid_AutoGeneratingColumn
private void grid_AutoGeneratingColumn(object sender, C1.WPF.DataGrid.DataGridAutoGeneratingColumnEventArgs e)
{
Common.HandleColumnAutoGeneration(e);
if (e.Property.Name == "ImageUrl")
{
e.Cancel = true;
}
}
示例15: Switch_2
static int Switch_2 (C1 o)
{
switch (o) {
case null:
return 2;
}
return 3;
}