コード例 #1
0
 private SharedFileInformationDialog()
 {
     m_Instance = this;
     InitializeComponent();
     m_DataGridView.SelectionChanged += new EventHandler(m_DataGridView_SelectionChanged);
     if (m_DataGridView.SelectedRows.Count > 0)
         Skip(m_DataGridView.SelectedRows[0].Index);
 }
コード例 #2
0
 private SharedFileInformationDialog()
 {
     m_Instance = this;
     InitializeComponent();
     m_DataGridView.SelectionChanged += new EventHandler(m_DataGridView_SelectionChanged);
     if (m_DataGridView.SelectedRows.Count > 0)
     {
         Skip(m_DataGridView.SelectedRows[0].Index);
     }
 }
コード例 #3
0
 private void SharedFileInformationDialog_FormClosed(object sender, FormClosedEventArgs e)
 {
     m_DataGridView.SelectionChanged -= new EventHandler(m_DataGridView_SelectionChanged);
     toolStripContainer.ContentPanel.Controls.Clear();
     if (m_InformationControl != null)
     {
         m_InformationControl.Dispose();
     }
     m_Instance = null;
 }
コード例 #4
0
        public SharedFilesControl(MainForm mainForm)
        {
            if (mainForm == null)
            {
                throw new ArgumentNullException("mainForm");
            }

            m_MainForm = mainForm;
            InitializeComponent();
            sharedFilesDataGridView.Sort(sharedFilesDataGridView.Columns["FileName"], ListSortDirection.Ascending);
            SharedFileInformationDialog.Initialize(sharedFilesDataGridView);
            // select always the first entry for the search
            columnComboBox.SelectedIndex = 0;
            // display nummer of shared files
            sharedFilesLabel.Text = string.Format(Properties.Resources.SharedFiles, 0, Core.SharedFiles.Count);

            //2008-07-28 Nochbaer BZ 56 load order of columns
            try
            {
                sharedFilesDataGridView.Columns["Icon"].DisplayIndex        = Int32.Parse(m_Settings["sharedIconIndex"]);
                sharedFilesDataGridView.Columns["Icon"].FillWeight          = float.Parse(m_Settings["sharedIconWidth"], System.Globalization.CultureInfo.CreateSpecificCulture("de-de"));
                sharedFilesDataGridView.Columns["RatingIcon"].DisplayIndex  = Int32.Parse(m_Settings["sharedRatingIconIndex"]);
                sharedFilesDataGridView.Columns["RatingIcon"].FillWeight    = float.Parse(m_Settings["sharedRatingIconWidth"], System.Globalization.CultureInfo.CreateSpecificCulture("de-de"));
                sharedFilesDataGridView.Columns["FileName"].DisplayIndex    = Int32.Parse(m_Settings["sharedFileNameIndex"]);
                sharedFilesDataGridView.Columns["FileName"].FillWeight      = float.Parse(m_Settings["sharedFileNameWidth"], System.Globalization.CultureInfo.CreateSpecificCulture("de-de"));
                sharedFilesDataGridView.Columns["FileSize"].DisplayIndex    = Int32.Parse(m_Settings["sharedFileSizeIndex"]);
                sharedFilesDataGridView.Columns["FileSize"].FillWeight      = float.Parse(m_Settings["sharedFileSizeWidth"], System.Globalization.CultureInfo.CreateSpecificCulture("de-de"));
                sharedFilesDataGridView.Columns["Directory"].DisplayIndex   = Int32.Parse(m_Settings["sharedDirectoryIndex"]);
                sharedFilesDataGridView.Columns["Directory"].FillWeight     = float.Parse(m_Settings["sharedDirectoryWidth"], System.Globalization.CultureInfo.CreateSpecificCulture("de-de"));
                sharedFilesDataGridView.Columns["Album"].DisplayIndex       = Int32.Parse(m_Settings["sharedAlbumIndex"]);
                sharedFilesDataGridView.Columns["Album"].FillWeight         = float.Parse(m_Settings["sharedAlbumWidth"], System.Globalization.CultureInfo.CreateSpecificCulture("de-de"));
                sharedFilesDataGridView.Columns["Artist"].DisplayIndex      = Int32.Parse(m_Settings["sharedArtistIndex"]);
                sharedFilesDataGridView.Columns["Artist"].FillWeight        = float.Parse(m_Settings["sharedArtistWidth"], System.Globalization.CultureInfo.CreateSpecificCulture("de-de"));
                sharedFilesDataGridView.Columns["Title"].DisplayIndex       = Int32.Parse(m_Settings["sharedTitleIndex"]);
                sharedFilesDataGridView.Columns["Title"].FillWeight         = float.Parse(m_Settings["sharedTitleWidth"], System.Globalization.CultureInfo.CreateSpecificCulture("de-de"));
                sharedFilesDataGridView.Columns["lastRequest"].DisplayIndex = Int32.Parse(m_Settings["sharedlastRequestIndex"]);
                sharedFilesDataGridView.Columns["lastRequest"].FillWeight   = float.Parse(m_Settings["sharedlastRequestWidth"], System.Globalization.CultureInfo.CreateSpecificCulture("de-de"));
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("Error loading style of columns\n\n" + ex.Message, "SharedFilesControl", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            m_start = false;
        }
コード例 #5
0
 private void SharedFileInformationDialog_FormClosed(object sender, FormClosedEventArgs e)
 {
     m_DataGridView.SelectionChanged -= new EventHandler(m_DataGridView_SelectionChanged);
     toolStripContainer.ContentPanel.Controls.Clear();
     if (m_InformationControl != null)
         m_InformationControl.Dispose();
     m_Instance = null;
 }
コード例 #6
0
 private void showInformationToolStripMenuItem_Click(object sender, EventArgs e)
 {
     SharedFileInformationDialog.ShowInformation(this);
 }