Пример #1
0
 void ItemLengthLabelUpdate()
 {
     multiMode           = MultipleMode.None;
     multiCopy           = false;
     pv.AdditionalString = null;
     if (menuMultiCopy.Checked)
     {
         menuMultiCopy.Checked = false;
     }
     waitingKey       = Keys.None;
     statusLabel.Text = "完了";
     if (Core.CurrentOperation == null)
     {
         itemLengthLabel.Text = "0 / 0";
     }
     else
     {
         itemLengthLabel.Text = (Core.CurrentOperation.Index + 1).ToString() + " / " + Core.CurrentOperation.Data.ElementsLength.ToString();
         if (Core.Config.BehaviorConfig.BackupInterval != 0 &&
             Core.CurrentOperation.Index % Core.Config.BehaviorConfig.BackupInterval == 0)
         {
             Subsystem.OperationPackager.DoBackup();
         }
     }
 }
Пример #2
0
        public bool Acceptable(MultipleMode mode)
        {
            switch (mode)
            {
            case MultipleMode.NativeMulti:
            case MultipleMode.Sequencable:
                return(Args.Count > 0);

            case MultipleMode.SingleOnly:
                return(Args.Count == 1);
            }
            return(false);
        }
Пример #3
0
 private void menuSetFolder_Click(object sender, EventArgs e)
 {
     if (multiMode == MultipleMode.FolderMulti)
     {
         multiMode             = MultipleMode.None;
         menuSetFolder.Checked = false;
         UpdateAdditionalString();
     }
     else
     {
         multiMode             = MultipleMode.FolderMulti;
         menuSetMulti.Checked  = false;
         menuSetFolder.Checked = true;
         UpdateAdditionalString();
     }
 }
Пример #4
0
        public override void Call(MultipleMode mode)
        {
            switch (mode)
            {
            case MultipleMode.NativeMulti:
                Method.Invoke(Args[0], new object[] { Args.ToArray() });
                break;

            case MultipleMode.Sequencable:
                for (int i = 0; i < Args.Count; i++)
                {
                    Method.Invoke(Args[i], null);
                }
                break;

            case MultipleMode.SingleOnly:
                Method.Invoke(Args[0], null);
                break;
            }
        }
Пример #5
0
 private void menuSetMulti_Click(object sender, EventArgs e)
 {
     if (multiMode == MultipleMode.NumericMulti)
     {
         multiMode            = MultipleMode.None;
         menuSetMulti.Checked = false;
         UpdateAdditionalString();
     }
     else
     {
         using (var mul = new Dialogs.MultiProcess(Core.CurrentOperation.Data.ElementsLength - Core.CurrentOperation.Index))
         {
             if (mul.ShowDialog() == DialogResult.OK)
             {
                 multiMode             = MultipleMode.NumericMulti;
                 setMultiValue         = mul.GetValue();
                 menuSetMulti.Checked  = true;
                 menuSetFolder.Checked = false;
                 UpdateAdditionalString();
             }
         }
     }
 }
Пример #6
0
        public override void Call(MultipleMode mode)
        {
            switch (mode)
            {
            case MultipleMode.NativeMulti:
                MultiAction(Args.ToArray());
                break;

            case MultipleMode.Sequencable:
                foreach (var action in Actions)
                {
                    action();
                }
                break;

            case MultipleMode.SingleOnly:
                if (Actions[0] != null)
                {
                    Actions[0]();
                }
                break;
            }
        }
Пример #7
0
 public abstract void Call(MultipleMode mode);
Пример #8
0
 private void menuSetMulti_Click(object sender, EventArgs e)
 {
     if (multiMode == MultipleMode.NumericMulti)
     {
         multiMode = MultipleMode.None;
         menuSetMulti.Checked = false;
         UpdateAdditionalString();
     }
     else
     {
         using (var mul = new Dialogs.MultiProcess(Core.CurrentOperation.Data.ElementsLength - Core.CurrentOperation.Index))
         {
             if (mul.ShowDialog() == DialogResult.OK)
             {
                 multiMode = MultipleMode.NumericMulti;
                 setMultiValue = mul.GetValue();
                 menuSetMulti.Checked = true;
                 menuSetFolder.Checked = false;
                 UpdateAdditionalString();
             }
         }
     }
 }
Пример #9
0
 private void menuSetFolder_Click(object sender, EventArgs e)
 {
     if (multiMode == MultipleMode.FolderMulti)
     {
         multiMode = MultipleMode.None;
         menuSetFolder.Checked = false;
         UpdateAdditionalString();
     }
     else
     {
         multiMode = MultipleMode.FolderMulti;
         menuSetMulti.Checked = false;
         menuSetFolder.Checked = true;
         UpdateAdditionalString();
     }
 }
Пример #10
0
 void ItemLengthLabelUpdate()
 {
     multiMode = MultipleMode.None;
     multiCopy = false;
     pv.AdditionalString = null;
     if (menuMultiCopy.Checked)
         menuMultiCopy.Checked = false;
     waitingKey = Keys.None;
     statusLabel.Text = "完了";
     if (Core.CurrentOperation == null)
     {
         itemLengthLabel.Text = "0 / 0";
     }
     else
     {
         itemLengthLabel.Text = (Core.CurrentOperation.Index + 1).ToString() + " / " + Core.CurrentOperation.Data.ElementsLength.ToString();
         if (Core.Config.BehaviorConfig.BackupInterval != 0 &&
             Core.CurrentOperation.Index % Core.Config.BehaviorConfig.BackupInterval == 0)
             Subsystem.OperationPackager.DoBackup();
     }
 }