private void SaveBTN_Click(object sender, EventArgs e)
        {
            if (Math.Abs(cropWidth) < 1 || ActualImage == OriginalImageT)
            {
                using (var info = new MessageForm("First crop the image to save it.\nIf don't wanna crop just close croper tool", 0))
                    info.ShowDialog();
                return;
            }

            ActualImage.Save(temppath + "temp.png");
            DialogResult1 = DialogResult.Yes;
            closeBtn.PerformClick();
        }
 private void CropBTN_Click(object sender, EventArgs e)
 {
     if (cancrop)
     {
         cancrop         = false;
         SaveBTN.Enabled = true;
         Crop();
     }
     else
     {
         using (var info = new MessageForm("Keep the click and move the mouse to determine the area to crop", 0))
             info.ShowDialog();
         return;
     }
 }
Beispiel #3
0
        private void ConfigBtn_Click(object sender, EventArgs e)
        {
            using (var design = new MessageForm(RectangularDesign.ToString(), 3))
            {
                design.ShowDialog();

                if (design.DialogResult == DialogResult.No)
                {
                    if (File.Exists(appdata + @"squaredesign"))
                    {
                        File.Delete(appdata + @"squaredesign");
                    }
                    RectangularDesign = true;
                }
                else if (design.DialogResult == DialogResult.Yes)
                {
                    File.Create(appdata + @"squaredesign").Close();
                    RectangularDesign = false;
                }
            }
        }
Beispiel #4
0
        private void SearchBox_TextChanged(object sender, EventArgs e)
        {
            string searchtext = SearchBox.Text.ToLower();

            if (String.IsNullOrWhiteSpace(SearchBox.Text))
            {
                searchtext = "";
            }
            else if (SearchBox.Text.Contains("Haruki1707"))
            {
                SearchBox.Text = "";
                using (var info = new MessageForm("", -1, ""))
                    info.ShowDialog();
                return;
            }

            var results = Buttonlist.FindAll(
                delegate(HistoryButton HB)
            {
                return(HB.Name.Contains(searchtext, StringComparison.OrdinalIgnoreCase));
            });

            Ypos = 0;
            panel1.VerticalScroll.Value = 0;
            foreach (var item in results)
            {
                item.Button.Location = new Point(0, Ypos - panel1.VerticalScroll.Value);
                Ypos += item.Button.Height;
            }

            foreach (var item in Buttonlist)
            {
                if (!results.Contains(item))
                {
                    item.Button.Location = new Point(0, -item.Button.Height);
                }
            }
        }
Beispiel #5
0
 public static void Info(string message, string clipboard = null)
 {
     using (var info = new MessageForm(message, 0, clipboard))
         info.ShowDialog();
 }
Beispiel #6
0
 public static void Error(string message)
 {
     using (var error = new MessageForm(message, 1))
         error.ShowDialog();
 }
Beispiel #7
0
 private void InfoButton_Click(object sender, EventArgs e)
 {
     using (var info = new MessageForm("ShortCutes  v" + Updater.ProgramFileVersion + "\n\nDeveloped by: Haruki1707\nGitHub: https://github.com/Haruki1707/ShortCutes", 5, "https://github.com/Haruki1707/ShortCutes"))
         info.ShowDialog();
 }