本文整理汇总了C#中System.Windows.Forms.Control.add_1x1方法的典型用法代码示例。如果您正苦于以下问题:C# Control.add_1x1方法的具体用法?C# Control.add_1x1怎么用?C# Control.add_1x1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Control
的用法示例。
在下文中一共展示了Control.add_1x1方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createGui_EditUsingCategories
public void createGui_EditUsingCategories(Control hostControl, string title1, string title2)
{
hostControl.clear();
var usersGui = hostControl.add_1x1(title1,title2,true,hostControl.width()/3);
var pageEditor = usersGui[1].Parent.clear().add_Control<ascx_MediaWiki_PageEditor_Simple>().buildGui(WikiApi);
var controls = usersGui[0].Parent.clear().add_1x1("Category Names","Pages in Selected Category",false);
var Categories_TreeView = controls[0].add_TreeView();
var PagesInCategories_TreeView = controls[1].add_TreeView();
MethodInvoker loadData =
()=>{
//Categories_TreeView.clear();
Categories_TreeView = controls[0].add_TreeViewWithFilter(WikiApi.categoryPages())
.afterSelect<string>(
(value)=>{
PagesInCategories_TreeView = controls[1].add_TreeViewWithFilter(WikiApi.pagesInCategory(value))
.afterSelect<string>((page)=>pageEditor.openPage(page));
pageEditor.openPage(value);
addEditMenuItemsToTreeView(PagesInCategories_TreeView);
});
addEditMenuItemsToTreeView(Categories_TreeView);
};
//PagesInCategories_TreeView.clear();
//Categories_TreeView.add_Nodes(WikiApi.categoryPages());
controls[1].insert_Below<Panel>(20)
.add_Link("Reload data",0,0,()=> loadData())
.click();
}
示例2: build_CreateAllMethodStreamsTab
public void build_CreateAllMethodStreamsTab(Control hostControl)
{
var allMethodStreamsPanel = hostControl.add_1x1("Options","All Method Streams",false,50);
var sourceCode = allMethodStreamsPanel[1].add_SourceCodeViewer();//add_MethodStreamViewer();
var treeView = sourceCode.insert_Left<TreeView>(300)
.showSelection()
.sort()
.afterSelect<string>(
(filePath)=>sourceCode.open(filePath));
var targerFolder = PublicDI.config.getTempFolderInTempDirectory("_AllMethodStreams");
allMethodStreamsPanel[0].parent<SplitContainer>().borderNone();
var optionsPanel = allMethodStreamsPanel[0].parent().clear();
var progressBar = optionsPanel.add_ProgressBar(25,0).align_Right(optionsPanel);
optionsPanel.add_LabelAndTextAndButton("Target Directory", targerFolder,"Create",
(text)=>{
AstData.createAllMethodsStreams(text, progressBar, null);
foreach(var file in targerFolder.files())
treeView.add_Node(file.fileName(), file);
treeView.selectFirst();
});
progressBar.onDrop(
(fileOrFolder)=>{
if (fileOrFolder.fileExists())
AstData.loadFile(fileOrFolder);
else
{
AstData.dispose();
AstData = new O2MappedAstData();
AstData.loadFiles(fileOrFolder.files("*.cs",true));
}
});
//tabPages.Add(tabControl.add_Tab("Step 2: Create Code Streams"));
//tabPages.Add(tabControl.add_Tab("Step 1: Create Final Findings"));
//Create all Method Streams
//var controls = tabPages;
//var MethodStreamPanel = controls[0].add_1x1("Current ","MethodStreams", false);
/*
var CodeStreamPanel = controls[1].add_1x1("Create CodeStreams", "CodeStreams", false);
var FindingsPanel = controls[2].add_1x1("Create Findings", "Final Findings",false);
// MethodStreamPanel
MethodStreamScript = MethodStreamPanel[0].add_Script(false);
MethodStreamViewer = MethodStreamPanel[1].add_MethodStreamViewer();
//CodeStreamPanel
CodeStreamScript = CodeStreamPanel[0].add_Script(false);
var CodeStreamScriptResult = CodeStreamPanel[1].add_1x1("Code Streams", "Raw Findings", true, CodeStreamScript.width()/2);
CodeStreamViewer = CodeStreamScriptResult[0].add_CodeStreamViewer();
RawFindingsViewer = CodeStreamScriptResult[1].add_FindingsViewer();
//RawFindingsViewer = FindingsPanel[1].add_FindingsViewer();
//CodeStreamViewer = MethodStreamPanel[1].add_CodeStreamViewer();
// FindingsPanel
FindingsScript = FindingsPanel[0].add_Script(false);
FinalFindingsViewer = FindingsPanel[1].add_FindingsViewer();
//var controls2 = host[1].add_1x1x1(true);
// extra vars
// script parameters
var scriptParameters = new Dictionary<string,object>();
scriptParameters.Add("methodStreamViewer", MethodStreamViewer);
scriptParameters.Add("codeStreamViewer", CodeStreamViewer);
scriptParameters.Add("rawFindingsViewer", RawFindingsViewer);
scriptParameters.Add("finalFindingsViewer", FinalFindingsViewer);
scriptParameters.Add("astData", AstData);
MethodStreamScript.InvocationParameters.AddRange(scriptParameters);
CodeStreamScript.InvocationParameters.AddRange(scriptParameters);
FindingsScript.InvocationParameters.AddRange(scriptParameters);
*/
}
示例3: showEditGui
public Control showEditGui(Control hostControl, string title1, string title2, Func<List<string>> getContent)
{
hostControl.clear();
var usersGui = hostControl.add_1x1(title1,title2,true, hostControl.width()/3);
var pageEditor = usersGui[1].add_Control<ascx_MediaWiki_PageEditor_Simple>().buildGui(WikiApi);
Action<Control> loadData =
(control)=>{
control.clear();
control.enabled(false);
O2Thread.mtaThread(
()=>{
var content = getContent();
var treeView = control.add_TreeViewWithFilter(content)
.afterSelect<string>((userPage)=> pageEditor.openPage(userPage));
addEditMenuItemsToTreeView(treeView);
control.enabled(true);
});
};
usersGui[0].insert_Below<Panel>(20)
.add_Link("Reload data",0,0,
()=> loadData(usersGui[0]))
.click();
return hostControl;
}