Beispiel #1
0
        protected override void OnDialogClosed(InteractionNotification context, object dialog, object dialogResult)
        {
            if (!(context is SaveFileNotificationEx contextEx) || !(dialog is CommonFileDialog fileDialog))
            {
                return;
            }

            var encodingGroupBox = (CommonFileDialogGroupBox)fileDialog.Controls.First();
            var encodingComboBox = (CommonFileDialogComboBox)encodingGroupBox.Items.First();

            contextEx.Encoding = ((FileActionExtensions.CommonFileDialogEncodingComboBoxItem)encodingComboBox.Items[encodingComboBox.SelectedIndex]).Encoding;
            base.OnDialogClosed(context, dialog, dialogResult);
        }
Beispiel #2
0
        protected override void OnPreviewShowDialog(InteractionNotification context, object dialog)
        {
            if (!(context is SaveFileNotificationEx contextEx) || !(dialog is CommonFileDialog fileDialog))
            {
                return;
            }

            var encodingComboBox = FileActionExtensions.ConvertToComboBox(contextEx.Encoding);
            var encodingGroupBox = new CommonFileDialogGroupBox($"{Resources.Label_Encoding}(&E):");

            encodingGroupBox.Items.Add(encodingComboBox);
            fileDialog.Controls.Add(encodingGroupBox);
            base.OnPreviewShowDialog(context, dialog);
        }
Beispiel #3
0
    //These two function will be deleted

    void InteractionUpdate()
    {
        if (InteractTarget != null && ControllerManager.SyncActions)
        {
            InteractTarget.SetMessage();
            InteractionNotification.TurnOn();
            if (ControllerManager.Actions.Submit.WasPressed)
            {
                InteractTarget.Interact();
            }
        }
        else
        {
            InteractionNotification.TurnOff();
        }
    }