Beispiel #1
0
 /// <summary>
 /// Called when Commands property has changed.
 /// </summary>
 /// <param name="oldValue">Old property value</param>
 /// <param name="newValue">New property value</param>
 protected virtual void OnCommandsChanged(MetroBillCommands oldValue, MetroBillCommands newValue)
 {
     if (newValue != null)
     {
         saveButton.Command = newValue.NewListCommands.Add;
         cancelButton.Command = newValue.NewListCommands.Cancel;
     }
     else
     {
         saveButton.Command = null;
         cancelButton.Command = null;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Called when Commands property has changed.
 /// </summary>
 /// <param name="oldValue">Old property value</param>
 /// <param name="newValue">New property value</param>
 protected virtual void OnCommandsChanged(MetroBillCommands oldValue, MetroBillCommands newValue)
 {
     if (newValue != null)
     {
         ui_buttonX_logon.Command = newValue.StartControlCommands.Logon;
         ui_buttonX_exit.Command = newValue.StartControlCommands.Exit;
     }
     else
     {
         ui_buttonX_logon.Command = null;
         ui_buttonX_exit.Command = null;
     }
 }
Beispiel #3
0
 /// <summary>
 /// Called when Commands property has changed.
 /// </summary>
 /// <param name="oldValue">Old property value</param>
 /// <param name="newValue">New property value</param>
 protected virtual void OnCommandsChanged(MetroBillCommands oldValue, MetroBillCommands newValue)
 {
     if (newValue != null)
     {
         //saveButton.Command = newValue.NewSymbolCommands.Add;
         ui_buttonX_newGroup.Command = newValue.NewSymbolCommands.NewGroup;
         ui_buttonX_editGroup.Command = newValue.NewSymbolCommands.EditGroup;
         ui_ButtonX_cancel.Command = newValue.NewSymbolCommands.Cancel;
     }
     else
     {
         ui_ButtonX_add.Command = null;
         ui_ButtonX_cancel.Command = null;
     }
 }
Beispiel #4
0
        public FormMainDN()
        {
            SuspendLayout();

            InitializeComponent();
            _commands = new MetroBillCommands
            {
                StartControlCommands = {Logon = new Command(), Exit = new Command()},
                NewSymbolCommands = {NewGroup = new Command(), Cancel = new Command(), EditGroup = new Command()},
                NewListCommands = {Add = new Command(), Cancel = new Command()},
                EditListCommands = {Save = new Command(), Cancel = new Command()}
            };

            _commands.StartControlCommands.Logon.Executed += StartControl_LogonClick;
            _commands.StartControlCommands.Exit.Executed += StartControl_ExitClick;

            _commands.NewSymbolCommands.Cancel.Executed += CancelNewSymbolExecuted;
            _commands.NewSymbolCommands.NewGroup.Executed += NewGroupNewSymbolExecuted;
            _commands.NewSymbolCommands.EditGroup.Executed += EditGroupNewSymbolExecuted;

            _commands.NewListCommands.Add.Executed += AddListControl_SaveClick;
            _commands.NewListCommands.Cancel.Executed += AddListControl_CancelClick;

            _commands.EditListCommands.Save.Executed += EditListControl_SaveClick;
            _commands.EditListCommands.Cancel.Executed += CancelEditListExecuted;

            //styledListControl1.ItemEditGroupClick += styledListControl1_ItemEditGroupClick;
            //groupList4.ItemEditGroupClick+=groupList4_ItemEditGroupClick;
            labelItemUserName.Text = @"ver " + Application.ProductVersion;

            _startControl = new StartControl {Commands = _commands};
            //_addUserControl = new AddUserControl {Commands = _commands, Tag = 0};

            Controls.Add(_startControl);
            _startControl.BringToFront();
            _startControl.SlideSide = DevComponents.DotNetBar.Controls.eSlideSide.Right;
            ResumeLayout(false);
            _busySymbolList = new DNetBusySymbolList();
            Daily_NotChanchedValuesManager.Init();
        }