C# 系统图纸尺寸(6F、13F); this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Font; this.ClientSize=新系统.Drawing.Size(974562); this.Controls.Add(this.splitContainerControl1); this.Name=“FrmAjanda”; Text=“DOĞALGAZ-TAKİP-AJANDA”; this.Load+=new System.EventHandler(this.FrmGiris\u Load); ((System.ComponentModel.ISupportInitialize)(this.schedulerStorage1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ısTakipDetayBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dSet)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit(); 此.splitContainerControl.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.navBarControl1)).EndInit(); this.navBarControl1.ResumeLayout(false); this.navBarGroupControlContainer1.ResumeLayout(false); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.comboKriter.Properties)).EndInit(); this.navBarGroupControlContainer2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dateNavigator1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.schedulerControl1)).EndInit(); 此选项为.resume布局(false); } #端区 private System.Windows.Forms.BindingSourceısTakipDetayBindingSource; 专用数据集; private System.Data.SqlClient.SqlConnection sqlConnection1; private System.Data.SqlClient.SqlCommand sqlSelectCommand1; private System.Data.SqlClient.SqlCommand sqlInsertCommand1; private System.Data.SqlClient.SqlCommand sqlUpdateCommand1; private System.Data.SqlClient.SqlCommand sqlDeleteCommand1; 私有System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1; 私有DevExpress.XtraEditors.SplitContainerControl SplitContainerControl 1; 私有DevExpress.XtraNavBar.NavBarControl navBarControl1; 私有DevExpress.XtraNavBar.NavBarGroup NavBarGroup 1; 私有DevExpress.XtraNavBar.NavBarItem itemGunluk; 私有DevExpress.XtraNavBar.NavBarItem itemHafta; 私有DevExpress.XtraNavBar.NavBarItem itemAylik; 私有DevExpress.XtraNavBar.NavBarItem itemCizelge; 私有DevExpress.XtraNavBar.NavBarGroup NavBarGroup 2; 私有DevExpress.XtraNavBar.NavBarItem itemYazdirPencer; 私有DevExpress.XtraNavBar.NavBarItem项目打印预览; 私有DevExpress.XtraNavBar.NavBarItem项目打印; private DevExpress.XtraScheduler.SchedulerControl schedulerControl1; public DevExpress.XtraScheduler.SchedulerStorage schedulerStorage1; 私有DevExpress.XtraNavBar.NavBarItem navBarItem1; 私有DevExpress.XtraNavBar.NavBarGroup NavBarGroup 3; 私有DevExpress.XtraNavBar.NavBarItem navBarItem3; 私有DevExpress.XtraNavBar.NavBarItem navBarItem2; private DevExpress.XtraNavBar.NavBarGroupControlContainer navBarGroupControlContainer1; private System.Windows.Forms.GroupBox groupBox1; 私有DevExpress.XtraEditors.ComboBoxEdit comboKriter; private System.Windows.Forms.labelKriter标签; 专用系统.Windows.Forms.RadioButton Radios; 专用系统.Windows.Forms.RadioButton radioPersonel; 专用系统.Windows.Forms.RadioButton radioTum; private DevExpress.XtraNavBar.NavBarGroupControlContainer navBarGroupControlContainer2; 专用DevExpress.XtraScheduler.DateNavigator日期导航器1; 私有DevExpress.XtraNavBar.NavBarGroup NavBarGroup 4; }
} 但问题是,它在两台计算机(xp sp3)上工作,但在第三台计算机(xp ultimate)上不工作。为什么 只有这个表单给出了错误,其他表单工作正常C# 系统图纸尺寸(6F、13F); this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Font; this.ClientSize=新系统.Drawing.Size(974562); this.Controls.Add(this.splitContainerControl1); this.Name=“FrmAjanda”; Text=“DOĞALGAZ-TAKİP-AJANDA”; this.Load+=new System.EventHandler(this.FrmGiris\u Load); ((System.ComponentModel.ISupportInitialize)(this.schedulerStorage1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ısTakipDetayBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dSet)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit(); 此.splitContainerControl.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.navBarControl1)).EndInit(); this.navBarControl1.ResumeLayout(false); this.navBarGroupControlContainer1.ResumeLayout(false); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.comboKriter.Properties)).EndInit(); this.navBarGroupControlContainer2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dateNavigator1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.schedulerControl1)).EndInit(); 此选项为.resume布局(false); } #端区 private System.Windows.Forms.BindingSourceısTakipDetayBindingSource; 专用数据集; private System.Data.SqlClient.SqlConnection sqlConnection1; private System.Data.SqlClient.SqlCommand sqlSelectCommand1; private System.Data.SqlClient.SqlCommand sqlInsertCommand1; private System.Data.SqlClient.SqlCommand sqlUpdateCommand1; private System.Data.SqlClient.SqlCommand sqlDeleteCommand1; 私有System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1; 私有DevExpress.XtraEditors.SplitContainerControl SplitContainerControl 1; 私有DevExpress.XtraNavBar.NavBarControl navBarControl1; 私有DevExpress.XtraNavBar.NavBarGroup NavBarGroup 1; 私有DevExpress.XtraNavBar.NavBarItem itemGunluk; 私有DevExpress.XtraNavBar.NavBarItem itemHafta; 私有DevExpress.XtraNavBar.NavBarItem itemAylik; 私有DevExpress.XtraNavBar.NavBarItem itemCizelge; 私有DevExpress.XtraNavBar.NavBarGroup NavBarGroup 2; 私有DevExpress.XtraNavBar.NavBarItem itemYazdirPencer; 私有DevExpress.XtraNavBar.NavBarItem项目打印预览; 私有DevExpress.XtraNavBar.NavBarItem项目打印; private DevExpress.XtraScheduler.SchedulerControl schedulerControl1; public DevExpress.XtraScheduler.SchedulerStorage schedulerStorage1; 私有DevExpress.XtraNavBar.NavBarItem navBarItem1; 私有DevExpress.XtraNavBar.NavBarGroup NavBarGroup 3; 私有DevExpress.XtraNavBar.NavBarItem navBarItem3; 私有DevExpress.XtraNavBar.NavBarItem navBarItem2; private DevExpress.XtraNavBar.NavBarGroupControlContainer navBarGroupControlContainer1; private System.Windows.Forms.GroupBox groupBox1; 私有DevExpress.XtraEditors.ComboBoxEdit comboKriter; private System.Windows.Forms.labelKriter标签; 专用系统.Windows.Forms.RadioButton Radios; 专用系统.Windows.Forms.RadioButton radioPersonel; 专用系统.Windows.Forms.RadioButton radioTum; private DevExpress.XtraNavBar.NavBarGroupControlContainer navBarGroupControlContainer2; 专用DevExpress.XtraScheduler.DateNavigator日期导航器1; 私有DevExpress.XtraNavBar.NavBarGroup NavBarGroup 4; },c#,installation,C#,Installation,} 但问题是,它在两台计算机(xp sp3)上工作,但在第三台计算机(xp ultimate)上不工作。为什么 只有这个表单给出了错误,其他表单工作正常 这可能是因为操作系统的原因吗?似乎每次加载表单时,该失败表单上的一个控件都会将对象添加到列表/字典中。设计器然后向设计器文件添加第二行,下次加载表单时,它将失败,并出现该错误 因此,请发布表单的设计器部分。我们可能需要查看一些代码来进行此操作。实际上,我们可能需要查看加载失败的表单的设计器代码。幸好您编辑了此问题。但您也需要其他设计器代码。我知
这可能是因为操作系统的原因吗?似乎每次加载表单时,该失败表单上的一个控件都会将对象添加到列表/字典中。设计器然后向设计器文件添加第二行,下次加载表单时,它将失败,并出现该错误
因此,请发布表单的设计器部分。我们可能需要查看一些代码来进行此操作。实际上,我们可能需要查看加载失败的表单的设计器代码。幸好您编辑了此问题。但您也需要其他设计器代码。我知道里面有很多东西,但是一些用户控件想在集合中添加任何东西两次。。。这是需要找到的。有一种更简单的方法可以做到,因为您最终不想在这里完全使用设计器代码,您只需将失败的设计器文件与未失败的设计器文件区分开来。。。你应该马上看到问题的根源。谢谢。。但我不明白为什么它在一台计算机上工作,而在另一台计算机上不工作?这一份文件在另外两台计算机上打开了吗?阿卡拉多根,请像拉塞·卡尔森所说的那样编辑你的问题。第二,请在您的问题中输入失败表单的设计代码,以便我们能够找出错误所在。如果我们知道是什么,我们就能找到原因,而不是反过来。
DBClass db = new DBClass();
private void FrmGiris_Load(object sender, EventArgs e)
{
string sorgu = "select top 50 * from IsTakipDetay where Asama='Yapılacak'";
DataTable data = db.DBSelect(sorgu);
if (schedulerStorage1.Appointments.Count > 0)
schedulerStorage1.Appointments.Clear();
for (int i = 0; i < data.Rows.Count; i++)
{
DevExpress.XtraScheduler.Appointment app = new DevExpress.XtraScheduler.Appointment();
app.Start = Convert.ToDateTime(data.Rows[i]["Saat"]);
app.End = Convert.ToDateTime(data.Rows[i]["Saat"]);
app.Subject = data.Rows[i]["IsAdi"].ToString() + "-" + data.Rows[i]["DetayAdi"].ToString();
DataTable dt = db.DBSelect("select MusteriAdi,Adres from IsTakip where Id=" + Convert.ToInt32(data.Rows[i]["IsId"]));
if (dt.Rows.Count > 0)
{
app.Location = dt.Rows[0]["Adres"].ToString();
app.Description = "Müşteri Adı: " + dt.Rows[0]["MusteriAdi"].ToString() + " / Personel Adı:" + data.Rows[i]["PersonelAdi"].ToString();
}
schedulerStorage1.Appointments.Add(app);
}
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAjanda));
DevExpress.XtraScheduler.TimeRuler timeRuler1 = new DevExpress.XtraScheduler.TimeRuler();
DevExpress.XtraScheduler.TimeRuler timeRuler2 = new DevExpress.XtraScheduler.TimeRuler();
this.schedulerStorage1 = new DevExpress.XtraScheduler.SchedulerStorage(this.components);
this.ısTakipDetayBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.dSet = new Dogalgaz.dSet();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl();
this.navBarControl1 = new DevExpress.XtraNavBar.NavBarControl();
this.navBarGroup1 = new DevExpress.XtraNavBar.NavBarGroup();
this.itemGunluk = new DevExpress.XtraNavBar.NavBarItem();
this.itemHafta = new DevExpress.XtraNavBar.NavBarItem();
this.itemAylik = new DevExpress.XtraNavBar.NavBarItem();
this.itemCizelge = new DevExpress.XtraNavBar.NavBarItem();
this.navBarGroupControlContainer1 = new DevExpress.XtraNavBar.NavBarGroupControlContainer();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.radioIs = new System.Windows.Forms.RadioButton();
this.radioPersonel = new System.Windows.Forms.RadioButton();
this.radioTum = new System.Windows.Forms.RadioButton();
this.comboKriter = new DevExpress.XtraEditors.ComboBoxEdit();
this.labelKriter = new System.Windows.Forms.Label();
this.navBarGroupControlContainer2 = new DevExpress.XtraNavBar.NavBarGroupControlContainer();
this.dateNavigator1 = new DevExpress.XtraScheduler.DateNavigator();
this.schedulerControl1 = new DevExpress.XtraScheduler.SchedulerControl();
this.navBarGroup3 = new DevExpress.XtraNavBar.NavBarGroup();
this.navBarItem2 = new DevExpress.XtraNavBar.NavBarItem();
this.navBarItem3 = new DevExpress.XtraNavBar.NavBarItem();
this.navBarItem1 = new DevExpress.XtraNavBar.NavBarItem();
this.navBarGroup2 = new DevExpress.XtraNavBar.NavBarGroup();
this.itemYazdirPencer = new DevExpress.XtraNavBar.NavBarItem();
this.itemPrintPreview = new DevExpress.XtraNavBar.NavBarItem();
this.itemPrint = new DevExpress.XtraNavBar.NavBarItem();
this.navBarGroup4 = new DevExpress.XtraNavBar.NavBarGroup();
((System.ComponentModel.ISupportInitialize)(this.schedulerStorage1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ısTakipDetayBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dSet)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit();
this.splitContainerControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.navBarControl1)).BeginInit();
this.navBarControl1.SuspendLayout();
this.navBarGroupControlContainer1.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.comboKriter.Properties)).BeginInit();
this.navBarGroupControlContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dateNavigator1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.schedulerControl1)).BeginInit();
this.SuspendLayout();
// Other controls codes//////////////////////
//
// FrmAjanda
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(974, 562);
this.Controls.Add(this.splitContainerControl1);
this.Name = "FrmAjanda";
this.Text = "DOĞALGAZ TAKİP - AJANDA";
this.Load += new System.EventHandler(this.FrmGiris_Load);
((System.ComponentModel.ISupportInitialize)(this.schedulerStorage1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ısTakipDetayBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dSet)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit();
this.splitContainerControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.navBarControl1)).EndInit();
this.navBarControl1.ResumeLayout(false);
this.navBarGroupControlContainer1.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.comboKriter.Properties)).EndInit();
this.navBarGroupControlContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dateNavigator1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.schedulerControl1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.BindingSource ısTakipDetayBindingSource;
private dSet dSet;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private DevExpress.XtraEditors.SplitContainerControl splitContainerControl1;
private DevExpress.XtraNavBar.NavBarControl navBarControl1;
private DevExpress.XtraNavBar.NavBarGroup navBarGroup1;
private DevExpress.XtraNavBar.NavBarItem itemGunluk;
private DevExpress.XtraNavBar.NavBarItem itemHafta;
private DevExpress.XtraNavBar.NavBarItem itemAylik;
private DevExpress.XtraNavBar.NavBarItem itemCizelge;
private DevExpress.XtraNavBar.NavBarGroup navBarGroup2;
private DevExpress.XtraNavBar.NavBarItem itemYazdirPencer;
private DevExpress.XtraNavBar.NavBarItem itemPrintPreview;
private DevExpress.XtraNavBar.NavBarItem itemPrint;
private DevExpress.XtraScheduler.SchedulerControl schedulerControl1;
public DevExpress.XtraScheduler.SchedulerStorage schedulerStorage1;
private DevExpress.XtraNavBar.NavBarItem navBarItem1;
private DevExpress.XtraNavBar.NavBarGroup navBarGroup3;
private DevExpress.XtraNavBar.NavBarItem navBarItem3;
private DevExpress.XtraNavBar.NavBarItem navBarItem2;
private DevExpress.XtraNavBar.NavBarGroupControlContainer navBarGroupControlContainer1;
private System.Windows.Forms.GroupBox groupBox1;
private DevExpress.XtraEditors.ComboBoxEdit comboKriter;
private System.Windows.Forms.Label labelKriter;
private System.Windows.Forms.RadioButton radioIs;
private System.Windows.Forms.RadioButton radioPersonel;
private System.Windows.Forms.RadioButton radioTum;
private DevExpress.XtraNavBar.NavBarGroupControlContainer navBarGroupControlContainer2;
private DevExpress.XtraScheduler.DateNavigator dateNavigator1;
private DevExpress.XtraNavBar.NavBarGroup navBarGroup4;
}