Exemple #1
0
        /// <summary>
        /// Handles the CellClick event of the dataGridView1 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Forms.DataGridViewCellEventArgs"/> instance containing the event data.</param>
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            DataRow row = (DataRow)dataGridView1.Rows[e.RowIndex].DataBoundItem;

            //ExceptionForm.ShowException("View exception", "View exception", row.Exception);
            FormObject.ShowObject("View exception", row.Exception);
        }
Exemple #2
0
        /// <summary>
        /// Handles the ItemDoubleClick event of the list control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="ItemEventArgs"/> instance containing the event data.</param>
        private void list_ItemDoubleClick(object sender, ItemEventArgs e)
        {
            var data = (LogEntry)list.GetModelObject(e.Item.Index);

            if (data.Object != null)
            {
                FormObject.ShowObject(AppCore.FormMain, data.Title, data.Object);
            }
        }
Exemple #3
0
        /// <summary>
        /// Handles the Click event of the buttonLoad control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void buttonLoad_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBoxFilePath.Text))
            {
                MessageBox.Show(this, "Please select file to load.", "Error load file", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            try
            {
                var fileInfo = new FileInfo(textBoxFilePath.Text);
                AddLog("Try load assembly " + fileInfo.Name);

                //var assemblyRef = new AssemblyName
                //                               {
                //                                   CodeBase = fileInfo.ToString()
                //                               };
                //Assembly.Load(assemblyRef);
                //AppDomain.CurrentDomain.AppendPrivatePath(fileInfo.Directory.FullName);
                // AppDomain.CurrentDomain.BaseDirectory



                //Assembly.LoadFile(fileInfo.ToString());

                //LoadAssemblyToSeppareteDomain(fileInfo);
                LoadAssembly(fileInfo);

                comboBoxForms.Items.Clear();
                FillCombo();
                comboBoxForms.SelectedIndex = 0;
                buttonLoad.Enabled          = false;
            }
            catch (ReflectionTypeLoadException ex)
            {
                AddLog(ex.ToString());
                AddLog("=========================== LoaderExceptions =====================================");
                foreach (var loaderException in ex.LoaderExceptions)
                {
                    AddLog(loaderException.ToString());
                }
                FormObject.ShowObject("Error load assembly", ex);
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.ToString(), "Error load file", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #4
0
        /// <summary>
        /// Handles the CellDoubleClick event of the dataGridView1 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Forms.DataGridViewCellEventArgs"/> instance containing the event data.</param>
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            DataRow data = (DataRow)dataGridView1.Rows[e.RowIndex].DataBoundItem;

            FormObject.ShowObject("Error " + data.GenerationName, data.Exception);
        }