Example #1
0
 public TEditor(ListBox lb, Song song, GUI owner, Translation trans)
 {
     //
     // Erforderlich für die Windows Form-Designerunterstützung
     //
     InitializeComponent();
     this.song = song;
     this.trans = trans;
     this.lb = lb;
     this.owner = owner;
     this.textBox2.Text = this.song.Number.ToString();
     this.textBox2.Enabled = false;
     TEditor.tEditor = this;
     TEditor.TEditorOpen = true;
     if (this.trans != null)
     {
         this.textBox1.Text = this.trans.Title;
         this.richTextBox1.Text = this.trans.Text;
         this.checkBox1.Checked = this.trans.Unformatted;
         this.panel1.Enabled = !this.trans.Unformatted;
     }
     else
     {
         this.textBox1.Text = "";
         this.richTextBox1.Text = "";
     }
 }
Example #2
0
 public static void ShowNewList(GUI owner)
 {
     if (NewList.newList == null)
     {
         NewList.newList = new NewList(owner);
     }
     NewList.newList.Show();
 }
Example #3
0
 public static DialogResult ShowUpdate(GUI owner)
 {
     if (LyraUpdate.lyraUpdate == null)
     {
         LyraUpdate.lyraUpdate = new LyraUpdate();
     }
     return LyraUpdate.lyraUpdate.ShowDialog(owner);
 }
Example #4
0
 private NewList(GUI owner)
 {
     //
     // Erforderlich für die Windows Form-Designerunterstützung
     //
     InitializeComponent();
     this.owner = owner;
 }
Example #5
0
 public static void ShowHistory(GUI owner)
 {
     if(_this == null)
     {
         _this = new History(owner);
     }
     _this.Show();
     _this.Focus();
 }
Example #6
0
 public Storage(string url, GUI owner)
 {
     this.PStorage = new PhysicalXML(Util.BASEURL + "\\" + url);
     this.SongList = this.PStorage.getSongs();
     this.owner = owner;
     // this.search = new Search();
     this.search = new IndexSearch(this.SongList.Values); // lucene searcher!
     Util.NRSONGS = this.SongList.Count;
 }
 public static DialogResult ShowUpdateView(GUI owner, string url, string desc,
     UpdateFileURL[] versions, bool backup)
 {
     if (LyraUpdateView.update == null)
     {
         LyraUpdateView.update = new LyraUpdateView(url, desc, versions, backup);
     }
     return LyraUpdateView.update.ShowDialog(owner);
 }
Example #8
0
 private Info(GUI owner)
 {
     this.owner = owner;
     InitializeComponent();
     this.label21.Text = Util.VER;
     this.label22.Text = Util.BUILD;
     this.label24.Text = ".NET " + Util.DOTNET;
     this.label25.Text = Util.NRSONGS.ToString();
     this.label26.Text = Util.NRUSE != 0 ? Convert.ToString(Util.TOTALLOAD/Util.NRUSE/TimeSpan.TicksPerMillisecond) + " ms" : "0 ms";
     this.label27.Text = Util.NRSEARCH != 0 ? Convert.ToString(Util.TOTALSEARCH/Util.NRSEARCH/TimeSpan.TicksPerMillisecond) + " ms" : "0 ms";
     this.label28.Text = Util.getUseTime();
 }
Example #9
0
 private History(GUI owner)
 {
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
     this.changedHandler = new EventHandler(View_HistoryChanged);
     View.HistoryChanged += this.changedHandler;
     this.Closing += new CancelEventHandler(History_Closing);
     this.Load += new EventHandler(History_Load);
     this.owner = owner;
     this.loadHistory();
     this.listBox3.Scrolled +=new ScrollEventHandler(listBox3_Scrolled);
     this.Move += new EventHandler(History_Move);
 }
        public PrBackground(GUI owner)
        {
            this.owner = owner;
            InitializeComponent();

            // init Screen
            this.Width = Screen.PrimaryScreen.Bounds.Width;
            this.Height = Screen.PrimaryScreen.Bounds.Height;
            this.Top = 0;
            this.Left = 0;

            this.label1.Text = "lyra2 v" + Util.VER + " " + Util.BUILD;
            this.label1.Top = this.Height - this.label1.Height - 15;
            this.label1.Left = this.Width - this.label1.Width - 15;
        }
Example #11
0
 private Preview(GUI owner, Song song, Point location)
 {
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
     this.owner = owner;
     this.song = song;
     this.Location = location;
     this.label1.Text = song.Number.ToString();
     this.label2.Text = song.Title;
     this.label3.Text = this.getText(song.Text);
     this.LostFocus += new EventHandler(Preview_LostFocus);
     this.Closing += new System.ComponentModel.CancelEventHandler(Preview_Closing);
     this.GotFocus += new EventHandler(Preview_GotFocus);
     this.closeBtn.GotFocus += new EventHandler(closeBtn_GotFocus);
 }
Example #12
0
 public Editor(Song song, GUI owner)
 {
     Editor.open = true;
     Editor.editor = this;
     InitializeComponent();
     this.Height = 460;
     if (song != null)
     {
         this.song = song;
         this.textBox1.Text = song.Title;
         this.textBox2.Text = song.Number.ToString();
         this.richTextBox1.Text = song.Text;
         this.button12.Enabled = true;
         if (song.Desc == "")
         {
             this.checkBox1.Checked = false;
             this.textBox3.Text = "---";
             this.textBox3.Enabled = false;
         }
         else
         {
             this.checkBox1.Checked = true;
             this.textBox3.Text = song.Desc;
             this.textBox3.Enabled = true;
         }
         if(song.BackgroundPicture != "")
         {
             this.textBox4.Text = song.BackgroundPicture;
             this.trackBar1.Value = song.Transparency;
             this.checkBox2.Checked = song.Scale;
         }
     }
     else
     {
         this.textBox1.Text = "";
         this.textBox2.Text = "";
         this.richTextBox1.Text = "";
         this.textBox2.Enabled = true;
         this.textBox3.Text = "---";
         this.checkBox1.Checked = false;
         this.textBox3.Enabled = false;
     }
     this.owner = owner;
 }
Example #13
0
        public static void ShowPreview(GUI owner, Song song, Point location)
        {
            if(_this != null)
            {
                if(_this.song == song)
                {
                    return; // do nothing
                }
                if(!_this.IsDisposed)
                {
                    _this.Close();
                }
                _this = null;
            }

            _this = new Preview(owner, song, location);
            _this.Show();
            _this.Focus();
        }
Example #14
0
 public static void showInfo(GUI owner)
 {
     if (Info.info == null) Info.info = new Info(owner);
     Info.info.Show();
     owner.Enabled = false;
 }
Example #15
0
 public static void ShowSong(Song song, Translation trans, GUI owner, ListBox navigate)
 {
     if(_this == null)
     {
         _this = new View();
     }
     _this.menuItem1.Visible = false;
     _this.owner = owner;
     _this.navigate = navigate;
     _this.menuItem6.Checked = Util.SHOWRIGHT;
     _this.richTextBox1.Font = Util.FONT;
     _this.richTextBox2.Font = Util.FONT;
     if (trans != null)
     {
         _this.refresh(song, trans);
     }
     else
     {
         _this.refresh(song);
     }
     _this.richTextBox1.Focus();
     _this.pos = navigate.Items.IndexOf(_this.song);
     _this.Show();
 }
Example #16
0
 public static void ShowSong(Song song, GUI owner, ListBox navigate)
 {
     Preview.ClosePreview();
     View.ShowSong(song, null, owner, navigate);
     _this.menuItem1.Visible = true;
 }
Example #17
0
 public TEditor(ListBox lb, Song song, GUI owner)
     : this(lb, song, owner, null)
 {
 }
Example #18
0
 public static void showHTML(GUI owner, ListBox box, string idtext)
 {
     if (HTML.myHTML == null)
     {
         HTML.myHTML = new HTML(owner, box, idtext);
     }
     HTML.myHTML.Enabled = true;
     HTML.myHTML.Show();
     HTML.myHTML.Focus();
 }
Example #19
0
        private HTML(GUI owner, ListBox box, string idtext)
        {
            //
            // Erforderlich für die Windows Form-Designerunterstützung
            //
            InitializeComponent();

            this.owner = owner;
            this.box = box;
            this.idtext = idtext;
            this.updateFields(Util.BASEURL);
        }