Esempio n. 1
0
        void save(object obj)
        {
            CreateSameStarting window = obj as CreateSameStarting;

            if (!this.Validate())
            {
                return;
            }

            if (this.OpratorEnum == OperatorEnum.Add)
            {
                window.Add = new UIClassHourRule
                {
                    UID        = Guid.NewGuid().ToString(),
                    IsActive   = this.IsActive,
                    ClassHours = this.TargetHours?.ToList(),
                    Weight     = this.Weight,
                };
            }
            else
            {
                window.Modify = new UIClassHourRule
                {
                    IsActive   = this.IsActive,
                    ClassHours = this.TargetHours?.ToList(),
                    Weight     = this.Weight
                };
            }

            window.DialogResult = true;
        }
Esempio n. 2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.win = ((OSKernel.Presentation.Arranging.Administrative.Modify.Algo.ClassHour.Dialog.CreateSameStarting)(target));
                return;

            case 2:
                this.source_list = ((System.Windows.Controls.ListBox)(target));
                return;

            case 3:
                this.target_list = ((System.Windows.Controls.ListBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 3
0
        void cancel(object obj)
        {
            CreateSameStarting window = obj as CreateSameStarting;

            window.Close();
        }