예제 #1
0
        private static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Notepad notepad = new Notepad();

            if (args.Length > 0)
            {
                string path = args[0];

                StreamReader sr = new StreamReader(path, Encoding.UTF8);
                notepad.textBox.Text = sr.ReadToEnd();
                sr.Close();

                if (Path.GetExtension(path) != ".txt")
                {
                    MessageBox.Show("WARNING: You just opened file with Notepad DOT unsupported file format. Your file text may look corrupted or incorrectly displayed. Use this file with Notepad DOT at your own risk.", "Notepad DOT", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                notepad.Text = Path.GetFileName(path) + " - Notepad DOT";

                notepad.textBox.SelectionStart  = notepad.textBox.Text.Length;
                notepad.textBox.SelectionLength = 0;

                notepad.currentOpenFileName = path;
            }
            Application.Run(notepad);
        }
예제 #2
0
 public ProgressBarForm(Notepad notepad)
 {
     InitializeComponent();
     this.notepad       = notepad;
     this.Icon          = new Icon("AppIco/Word.ico");
     this.StartPosition = FormStartPosition.CenterParent;
     threadRun          = new Thread(new ThreadStart(CheckTextWordError));
 }
예제 #3
0
 public static void Postfix(SelectToolHoverTextCard __instance, List <KSelectable> hoverObjects)
 {
     foreach (KSelectable selectable in hoverObjects)
     {
         Notepad pad = selectable.gameObject.GetComponent <Notepad>();
         if (pad != null)
         {
             HoverTextScreen instance = HoverTextScreen.Instance;
             HoverTextDrawer hover    = instance.BeginDrawing();
             hover.BeginShadowBar();
             hover.DrawIcon(Assets.GetSprite("icon_category_furniture"), 20);
             hover.DrawText(pad.activateText, __instance.ToolTitleTextStyle);
             hover.EndShadowBar();
             hover.EndDrawing();
         }
     }
 }
예제 #4
0
        private void NewTab_Click(object sender, EventArgs e)
        {
            Notepad NewNot = new Notepad();

            NewNot.Show();
        }