void UpdateSize() { label1.LabelProp = String.Empty; if (File != null) { label1.LabelProp = StringWorks.BytesToIECUnitsString((uint)File.LongLength); } }
void ConfigureDlg() { yentryName.Binding.AddBinding(Entity, e => e.Name, w => w.Text).InitializeFromSource(); ylabelSize.Binding.AddFuncBinding(Entity, e => StringWorks.BytesToIECUnitsString((ulong)e.FileSize), w => w.LabelProp).InitializeFromSource(); ycomboType.ItemsEnum = typeof(ContractType); ycomboType.Binding.AddBinding(Entity, e => e.TemplateType, w => w.SelectedItem).InitializeFromSource(); Entity.PropertyChanged += Entity_PropertyChanged; }
void UpdateSize() { ylabelSize.LabelProp = String.Empty; if (ChangedDoc != null) { ylabelSize.LabelProp = StringWorks.BytesToIECUnitsString((uint)ChangedDoc.LongLength); } else if (Template != null) { ylabelSize.LabelProp = StringWorks.BytesToIECUnitsString((uint)Template.File.LongLength); } }