コード例 #1
0
ファイル: TEditor.cs プロジェクト: BackupTheBerlios/lyra2-svn
 public TEditor(ListBox lb, ISong song, GUI owner, ITranslation trans)
 {
     //
     // Erforderlich für die Windows Form-Designerunterstützung
     //
     InitializeComponent();
     this.AcceptButton = this.button1;
     this.song = song;
     this.trans = trans;
     this.lb = lb;
     this.owner = owner;
     this.textBox2.Text = this.song.Number.ToString();
     this.textBox2.Enabled = false;
     tEditor = this;
     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 = "";
     }
 }
コード例 #2
0
 public static DialogResult ShowUpdate(GUI owner)
 {
     if (LyraUpdate.lyraUpdate == null)
     {
         LyraUpdate.lyraUpdate = new LyraUpdate();
     }
     return LyraUpdate.lyraUpdate.ShowDialog(owner);
 }
コード例 #3
0
ファイル: Storage.cs プロジェクト: ogirard/lyra2
 public Storage(string url, GUI owner)
 {
     this._physicalStorage = new PhysicalXml(Util.BASEURL + "\\" + url);
       this._songList = this._physicalStorage.GetSongs();
       this._owner = owner;
       Util.NRSONGS = this._songList.Count;
       InitializeSearch();
 }
コード例 #4
0
 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);
 }
コード例 #5
0
ファイル: NewList.cs プロジェクト: BackupTheBerlios/lyra2-svn
 private NewList(GUI owner)
 {
     //
     // Erforderlich für die Windows Form-Designerunterstützung
     //
     InitializeComponent();
     this.owner = owner;
     this.AcceptButton = this.button1;
 }
コード例 #6
0
ファイル: Storage.cs プロジェクト: BackupTheBerlios/lyra2-svn
 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;
 }
コード例 #7
0
 public static void ShowFavorites(GUI owner)
 {
     if (_this == null)
     {
         _this = new Favorites(owner);
         LoadPersonalizationSettings(owner.Personalizer);
     }
     _this.Show();
     _this.Focus();
 }
コード例 #8
0
 private Favorites(GUI owner)
 {
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
     this.StartPosition = FormStartPosition.Manual;
     this.Closing += Favorites_Closing;
     this.owner = owner;
 }
コード例 #9
0
ファイル: Info.cs プロジェクト: BackupTheBerlios/lyra2-svn
 private Info(GUI owner)
 {
     this.owner = owner;
     InitializeComponent();
     this.label21.Text = Util.VER;
     this.label22.Text = Util.BUILD;
     this.label23.Text = GUI.DEBUG ? "ja" : "nein";
     this.label24.Text = "Microsoft .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();
 }
コード例 #10
0
ファイル: History.cs プロジェクト: ogirard/lyra2
 private History(GUI owner)
 {
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
     this.StartPosition = FormStartPosition.Manual;
     this.changedHandler = View_HistoryChanged;
     View.HistoryChanged += this.changedHandler;
     this.Closing += History_Closing;
     this.owner = owner;
     this.loadHistory();
 }
コード例 #11
0
ファイル: Editor.cs プロジェクト: BackupTheBerlios/lyra2-svn
 public Editor(ISong song, GUI owner)
 {
     open = true;
     editor = this;
     this.AcceptButton = this.button1;
     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;
     this.toolbars.ToolClick += ToolbarsClickHandler;
     ComboBoxTool combo = (ComboBoxTool)this.toolbars.Toolbars[0].Tools["indentCombo"];
     this.toolbars.Toolbars[0].Tools["undo"].SharedProps.Enabled = false;
     combo.SelectedIndex = 0;
 }
コード例 #12
0
        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 = "lyra v" + Util.VER + " " + Util.BUILD;
            this.label1.Top = this.Height - this.label1.Height - 15;
            this.label1.Left = this.Width - this.label1.Width - 15;
        }
コード例 #13
0
ファイル: NewList.cs プロジェクト: BackupTheBerlios/lyra2-svn
 public static void ShowNewList(GUI owner, string name, string[] songs)
 {
     if (NewList.newList == null)
     {
         NewList.newList = new NewList(owner);
     }
     newList.songs = songs;
     newList.nameTextBox.Text = name;
     WindowsIdentity wi = WindowsIdentity.GetCurrent();
     if (wi != null)
     {
         string[] parts = wi.Name.Split('\\');
         if (parts.Length > 0) newList.authorTextBox.Text = parts[parts.Length - 1];
     }
     NewList.newList.Show();
 }
コード例 #14
0
 private RemoteControl(GUI owner)
 {
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
     this.StartPosition = FormStartPosition.Manual;
     this.owner = owner;
     this.Closing += RemoteControl_Closing;
     View.SongDisplayed += ViewSongDisplayed;
     this.Update(View.CurrentSongInfo);
     bgw.DoWork += UnblinkWork;
     bgw.WorkerSupportsCancellation = true;
     foreach (Control control in this.Controls)
     {
         control.MouseWheel += MouseWheelHandler;
     }
     this.scrollBox.MouseWheel += MouseWheelHandler;
     this.MouseWheel += MouseWheelHandler;
     this.jumpMarksListBox.MouseWheel += MouseWheelHandler;
 }
コード例 #15
0
ファイル: View.cs プロジェクト: ogirard/lyra2
 public static void ShowSong(ISong song, GUI owner, ListBox navigate)
 {
     ShowSong(song, null, owner, navigate);
       _this._menuItem1.Visible = true;
 }
コード例 #16
0
ファイル: View.cs プロジェクト: ogirard/lyra2
        public static void ShowSong(ISong song, ITranslation trans, GUI owner, ListBox navigate)
        {
            if (_this == null)
              {
            _this = new View();
            _this._richTextBox1.ScrollDataChanged += OnRichTextBox1OnScrollDataChanged;
              }

              _this._song = song;
              _this._menuItem1.Visible = false;
              _this._owner = owner;
              _this.navigate = navigate;
              _this._menuItem6.Checked = Util.SHOWRIGHT;

              if (trans != null)
              {
            _this.RefreshSong(song, trans);
              }
              else
              {
            _this.RefreshSong(song);
              }
              _this._richTextBox1.Focus();
              _this.pos = navigate.Items.IndexOf(_this._song);
              _this.Show();
        }
コード例 #17
0
ファイル: NewList.cs プロジェクト: BackupTheBerlios/lyra2-svn
 public static void ShowNewList(GUI owner)
 {
     ShowNewList(owner, "Neue Liste", null);
 }
コード例 #18
0
ファイル: TEditor.cs プロジェクト: BackupTheBerlios/lyra2-svn
 public TEditor(ListBox lb, ISong song, GUI owner)
     : this(lb, song, owner, null)
 {
 }
コード例 #19
0
ファイル: Info.cs プロジェクト: BackupTheBerlios/lyra2-svn
 public static void showInfo(GUI owner)
 {
     if (Info.info == null) Info.info = new Info(owner);
     Info.info.Show();
     owner.Enabled = false;
 }
コード例 #20
0
 public static void ShowRemoteControl(GUI owner)
 {
     if (_this == null)
     {
         _this = new RemoteControl(owner);
         LoadPersonalizationSettings(owner.Personalizer);
     }
     _this.Show();
     _this.Focus();
 }
コード例 #21
0
ファイル: View.cs プロジェクト: BackupTheBerlios/lyra2-svn
 public static void ShowSong(ISong song, ITranslation 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();
 }