| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046 |
- <UserControl
- x:Class="TeamAAS_VP.Views.SettingView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:c="clr-namespace:TeamAAS_VP.ValueConverter"
- xmlns:coreLights="clr-namespace:TeamAAS_VP.Core.Lights"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:enums="clr-namespace:TeamAAS_VP.Enums"
- xmlns:enums1="clr-namespace:Team.FFFeederService;assembly=Team.FFFeederService"
- xmlns:ext="clr-namespace:TeamAAS_VP.Extension"
- xmlns:io="clr-namespace:System.IO.Ports;assembly=System"
- xmlns:lex="http://wpflocalizeextension.codeplex.com"
- xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:sys="clr-namespace:System;assembly=mscorlib"
- xmlns:sysio="clr-namespace:System.IO.Ports;assembly=System"
- xmlns:valRules="clr-namespace:TeamAAS_VP.Identity"
- xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels"
- d:Background="White"
- d:DataContext="{d:DesignInstance Type=vm:SettingViewModel}"
- d:Height="1080"
- d:Width="1024"
- lex:LocalizeDictionary.DesignCulture="zh-CN"
- lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
- lex:ResxLocalizationProvider.DefaultDictionary="Lang"
- prism:ViewModelLocator.AutoWireViewModel="True"
- FontFamily="{DynamicResource DefaultFont}"
- mc:Ignorable="d">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="Loaded">
- <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- <UserControl.Resources>
- <c:RobotBrandToVisibiltyConverter x:Key="RobotBrandToVisibiltyConverter" />
- <c:RobotBrandToVisibiltyConverter x:Key="RobotBrandToVisibiltyConverterInverse" Inverse="True" />
- <c:PlcIdToNameConverter x:Key="PlcIdToNameConverter" />
- <!-- Header text style: no wrap and trim with ellipsis, allows header to size to content -->
- <Style x:Key="TabHeaderTextBlockStyle" TargetType="TextBlock">
- <Setter Property="TextWrapping" Value="NoWrap" />
- <Setter Property="TextTrimming" Value="CharacterEllipsis" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
- <ObjectDataProvider
- x:Key="Parity"
- MethodName="GetValues"
- ObjectType="{x:Type sys:Enum}">
- <ObjectDataProvider.MethodParameters>
- <x:Type TypeName="sysio:Parity" />
- </ObjectDataProvider.MethodParameters>
- </ObjectDataProvider>
- <ObjectDataProvider
- x:Key="StopBits"
- MethodName="GetValues"
- ObjectType="{x:Type sys:Enum}">
- <ObjectDataProvider.MethodParameters>
- <x:Type TypeName="sysio:StopBits" />
- </ObjectDataProvider.MethodParameters>
- </ObjectDataProvider>
- </UserControl.Resources>
- <Grid>
- <TabControl
- materialDesign:NavigationRailAssist.ShowSelectionBackground="True"
- SnapsToDevicePixels="True"
- Style="{StaticResource MaterialDesignNavigationRailTabControl}"
- TabStripPlacement="Left">
- <materialDesign:NavigationRailAssist.FloatingContent>
- <Button
- Margin="8"
- Content="{materialDesign:PackIcon Kind=OfficeBuildingCogOutline}"
- Style="{StaticResource MaterialDesignFloatingActionSecondaryButton}" />
- </materialDesign:NavigationRailAssist.FloatingContent>
- <!-- 相机配置 -->
- <TabItem Margin="5,0">
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="CameraPlusOutline" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="{lex:Loc SettingView_Camera_Text}" />
- </StackPanel>
- </TabItem.Header>
- <Grid Margin="16">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- 增删改查 -->
- <StackPanel
- Grid.ColumnSpan="2"
- IsEnabled="{Binding IsAllowEdit}"
- Orientation="Horizontal">
- <Button
- Command="{Binding AddCameraCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
- ToolTip="{lex:Loc SettingView_Camera_btnAddCamera}">
- <materialDesign:PackIcon Kind="Plus" />
- </Button>
- <Button
- Margin="20,0"
- Command="{Binding EditCameraCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
- ToolTip="{lex:Loc SettingView_Camera_btnEditCamera}">
- <materialDesign:PackIcon Kind="PuzzleEditOutline" />
- </Button>
- <Button
- Command="{Binding RemoveCameraCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
- ToolTip="{lex:Loc SettingView_Camera_btnRemoveCamera}">
- <materialDesign:PackIcon Kind="DeleteForeverOutline" />
- </Button>
- <Button
- Margin="20,0"
- Command="{Binding SaveCamerasCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniSecondaryDarkButton}"
- ToolTip="{lex:Loc 保存}">
- <materialDesign:PackIcon Kind="ContentSaveCheck" />
- </Button>
- </StackPanel>
- <!-- 相机列表 -->
- <TreeView
- Grid.Row="1"
- Grid.Column="0"
- SelectedItemChanged="TreeView_SelectedItemChanged">
- <TreeViewItem
- FontSize="{DynamicResource Font.Size.Title4}"
- FontWeight="Bold"
- Header="{lex:Loc SettingView_Camera_CameraList}"
- IsExpanded="True"
- ItemsSource="{Binding CameraList}">
- <TreeViewItem.ItemTemplate>
- <HierarchicalDataTemplate>
- <StackPanel Orientation="Vertical">
- <TextBlock FontSize="{DynamicResource Font.Size.Title4}">
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}. {1}">
- <Binding Path="CameraNo" />
- <Binding Path="CameraName" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 品牌,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding CameraBrand}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="-" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding ManufacturerName}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 型号,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding Model, Mode=TwoWay}" />
- <TextBlock
- Margin="10,0,0,0"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 序列号,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding SerialNumber, Mode=TwoWay}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 类型,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding CameraType}" />
- <TextBlock
- Margin="10,0,0,0"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="IP: " />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding CameraIp}" />
- </StackPanel>
- <Border
- Height="2"
- Margin="0"
- BorderBrush="Green"
- BorderThickness="2" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeViewItem.ItemTemplate>
- </TreeViewItem>
- </TreeView>
- </Grid>
- </TabItem>
- <!-- 设备信息 -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="RouterNetwork" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="设备信息" />
- </StackPanel>
- </TabItem.Header>
- <Grid Margin="16">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- 增删改查按钮 -->
- <StackPanel
- Grid.ColumnSpan="2"
- IsEnabled="{Binding IsAllowEdit}"
- Orientation="Horizontal">
- <Button
- Command="{Binding AddDeviceInfoCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
- ToolTip="添加设备">
- <materialDesign:PackIcon Kind="Plus" />
- </Button>
- <Button
- Margin="20,0"
- Command="{Binding RemoveDeviceInfoCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
- ToolTip="删除设备">
- <materialDesign:PackIcon Kind="DeleteForeverOutline" />
- </Button>
- <Button
- Command="{Binding SaveDeviceInfoCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniSecondaryDarkButton}"
- ToolTip="{lex:Loc 保存}">
- <materialDesign:PackIcon Kind="ContentSaveCheck" />
- </Button>
- </StackPanel>
- <!-- 设备列表 -->
- <TreeView
- Grid.Row="1"
- Grid.Column="0"
- SelectedItemChanged="TreeView_SelectedItemChanged">
- <TreeViewItem
- FontSize="{DynamicResource Font.Size.Title4}"
- FontWeight="Bold"
- Header="设备列表"
- IsExpanded="True"
- ItemsSource="{Binding DeviceInfoList}">
- <TreeViewItem.ItemTemplate>
- <HierarchicalDataTemplate>
- <StackPanel Orientation="Vertical">
- <TextBlock FontSize="{DynamicResource Font.Size.Title4}">
- <TextBlock.Text>
- <MultiBinding StringFormat="设备 {0}">
- <Binding Path="DeviceNo" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="DeviceName: " />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding DeviceName}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="Line: " />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding Line}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="Station: " />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding Station}" />
- </StackPanel>
- <Border
- Height="2"
- Margin="0"
- BorderBrush="Green"
- BorderThickness="2" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeViewItem.ItemTemplate>
- </TreeViewItem>
- </TreeView>
- <!-- 参数详情 -->
- <ScrollViewer
- Grid.Row="1"
- Grid.Column="1"
- Margin="20"
- IsEnabled="{Binding IsAllowEdit}"
- Visibility="{Binding SelectDeviceInfo, Converter={StaticResource ObjectToVisibilityConverter}}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <!-- 设备信息表单 -->
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="设备编号:" />
- <TextBlock
- Grid.Row="0"
- Grid.Column="1"
- Margin="6,2"
- VerticalAlignment="Center"
- Text="{Binding SelectDeviceInfo.DeviceNo}" />
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="设备名称:" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DeviceName, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="设备描述:" />
- <TextBox
- Grid.Row="2"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DeviceDesc, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="Url:" />
- <TextBox
- Grid.Row="3"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.MesUrl, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="Line:" />
- <TextBox
- Grid.Row="4"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.Line, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="5"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="Station:" />
- <TextBox
- Grid.Row="5"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.Station, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="6"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="FixtureId:" />
- <TextBox
- Grid.Row="6"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.FixtureId, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="7"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="f:" />
- <TextBox
- Grid.Row="7"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.F, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="8"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="comp:" />
- <TextBox
- Grid.Row="8"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.comp, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="9"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="LogUrl:" />
- <TextBox
- Grid.Row="9"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.LogUrl, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="10"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="apikey:" />
- <TextBox
- Grid.Row="10"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.ApiKey, Mode=TwoWay}" />
- <StackPanel
- Grid.Row="11"
- Grid.Column="1"
- Orientation="Horizontal">
- <CheckBox
- Grid.Row="11"
- Grid.Column="1"
- Margin="6,2"
- Command="{Binding CheckStatusCommand}"
- Content="启用 MES"
- IsChecked="{Binding SelectDeviceInfo.EnableMES, Mode=TwoWay}" />
- <!--<CheckBox Grid.Row="10"
- Grid.Column="1"
- Content="是否启用两次产品编号"
- IsChecked="{Binding SelectDeviceInfo.EnableDoubleMes, Mode=TwoWay}"
- Margin="6,2" />-->
- <CheckBox
- Grid.Row="11"
- Grid.Column="1"
- Margin="6,2"
- Command="{Binding CheckStatusCommand}"
- Content="是否启用锁螺丝XY超限"
- IsChecked="{Binding SelectDeviceInfo.EnableXY, Mode=TwoWay}" />
- </StackPanel>
-
- <StackPanel
- Grid.Row="13"
- Grid.Column="1"
- Orientation="Horizontal">
- <CheckBox
- Margin="6,2"
- Command="{Binding CheckStatusCommand}"
- Content="是否保存CSV文件"
- IsChecked="{Binding SelectDeviceInfo.SaveCsv, Mode=TwoWay}" />
- <CheckBox
- Margin="6,2"
- Content="是否保存ppid"
- IsChecked="{Binding SelectDeviceInfo.SaveCsvPPID, Mode=TwoWay}" />
- </StackPanel>
- <TextBlock
- Grid.Row="14"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="保存的CSV文件路径:" />
- <DockPanel
- Grid.Row="14"
- Grid.Column="1"
- Margin="6,2"
- HorizontalAlignment="Stretch">
- <Button
- HorizontalAlignment="Right"
- Command="{Binding SelectSaveImagePathCommand}"
- DockPanel.Dock="Right"
- ToolTip="{lex:Loc 选择路径}">
- <Button.Content>
- <materialDesign:PackIcon Kind="FolderOpenOutline" />
- </Button.Content>
- </Button>
- <TextBox Text="{Binding SelectDeviceInfo.SaveCsvPath, Mode=TwoWay}" />
- </DockPanel>
- <!-- CTQ 数据信息 -->
- <TextBlock
- Grid.Row="15"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="PROCESS_NAME:" />
- <TextBox
- Grid.Row="15"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.PROCESS_NAME, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="16"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="CTQ_LSL(压力下限):" />
- <TextBox
- Grid.Row="16"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.CTQ_LSL_Pressure, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="17"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="CTQ_USL(压力上限):" />
- <TextBox
- Grid.Row="17"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.CTQ_USL_Pressure, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="18"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="SUPPLIER_NAME:" />
- <TextBox
- Grid.Row="18"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.SUPPLIER_NAME, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="19"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="COMMODITY_TYPE:" />
- <TextBox
- Grid.Row="19"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.COMMODITY_TYPE, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="20"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="REVISION:" />
- <TextBox
- Grid.Row="20"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.REVISION, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="21"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="MFG_LOT#:" />
- <TextBox
- Grid.Row="21"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.MFG_LOT, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="22"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="MFG_ASSY_LINE:" />
- <TextBox
- Grid.Row="22"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.MFG_ASSY_LINE, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="23"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="PROCESS_MACHINE_ID:" />
- <TextBox
- Grid.Row="23"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.PROCESS_MACHINE_ID, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="24"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="螺丝型号1:" />
- <TextBox
- Grid.Row="24"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.Screwsize1, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="25"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="螺丝型号2:" />
- <TextBox
- Grid.Row="25"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.Screwsize2, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="26"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Text="螺丝型号3:" />
- <TextBox
- Grid.Row="26"
- Grid.Column="1"
- Margin="6,2"
- Text="{Binding SelectDeviceInfo.DataInfo.Screwsize3, Mode=TwoWay}" />
- </Grid>
- </Grid>
- </ScrollViewer>
- </Grid>
- </TabItem>
- <!-- 机器人 -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="RobotIndustrialOutline" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="{lex:Loc 机器人}" />
- </StackPanel>
- </TabItem.Header>
- <Grid Margin="16">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- 增删改查 -->
- <StackPanel
- Grid.ColumnSpan="2"
- IsEnabled="{Binding IsAllowEdit}"
- Orientation="Horizontal">
- <Button
- Command="{Binding AddRobotCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
- ToolTip="{lex:Loc 增加机器人}">
- <materialDesign:PackIcon Kind="Plus" />
- </Button>
- <Button
- Margin="20,0"
- Command="{Binding RemoveCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
- ToolTip="{lex:Loc 移除机器人}">
- <materialDesign:PackIcon Kind="DeleteForeverOutline" />
- </Button>
- <Button
- Command="{Binding SaveRobotsCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniSecondaryDarkButton}"
- ToolTip="{lex:Loc 保存}">
- <materialDesign:PackIcon Kind="ContentSaveCheck" />
- </Button>
- </StackPanel>
- <!-- 机器人列表 -->
- <TreeView
- Grid.Row="1"
- Grid.Column="0"
- SelectedItemChanged="TreeView_SelectedItemChanged">
- <TreeViewItem
- FontSize="{DynamicResource Font.Size.Title4}"
- FontWeight="Bold"
- Header="{lex:Loc 机器人列表}"
- IsExpanded="True"
- ItemsSource="{Binding RobotList}">
- <TreeViewItem.ItemTemplate>
- <HierarchicalDataTemplate>
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock FontSize="{DynamicResource Font.Size.Title4}">
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}. {1}">
- <Binding Path="RobotNo" />
- <Binding Path="RobotName" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 品牌,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding RobotBrand, Mode=TwoWay}" />
- <TextBlock
- Margin="10,0,0,0"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 连接方式,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}"
- Visibility="{Binding RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
- <TextBlock
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding ConnectType, Mode=TwoWay}"
- Visibility="{Binding RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
- <!-- PLC -->
- <TextBlock
- Margin="10,0,0,0"
- d:Visibility="Collapsed"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="PLC: "
- Visibility="{Binding RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverterInverse}}" />
- <TextBlock
- d:Visibility="Collapsed"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding PLC, Converter={StaticResource PlcIdToNameConverter}}"
- Visibility="{Binding RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverterInverse}}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal" Visibility="{Binding RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding IP, StringFormat=IP:{0}, Mode=TwoWay}" />
- <TextBlock
- Margin="10,0"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding Port, StringFormat=Port:{0}, Mode=TwoWay}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 结束符,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding Terminator, Mode=TwoWay}" />
- </StackPanel>
- <Border
- Height="2"
- Margin="0"
- BorderBrush="Green"
- BorderThickness="2" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeViewItem.ItemTemplate>
- </TreeViewItem>
- </TreeView>
- <!-- 参数详情 -->
- <ScrollViewer
- Grid.Row="1"
- Grid.Column="1"
- Margin="20"
- IsEnabled="{Binding IsAllowEdit}"
- Visibility="{Binding SelectRobot, Converter={StaticResource ObjectToVisibilityConverter}}">
- <Grid HorizontalAlignment="Stretch" VerticalAlignment="Top">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- id -->
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="Id: " />
- <TextBlock
- x:Name="txt_Id"
- Grid.Row="0"
- Grid.Column="1"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{Binding SelectRobot.Id, Mode=TwoWay}" />
- <!-- 名称 -->
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 名称,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="SelectRobot.RobotName">
- <Binding.ValidationRules>
- <valRules:NameValidationRule />
- </Binding.ValidationRules>
- </Binding>
- </TextBox.Text>
- </TextBox>
- <!-- 机器人品牌 -->
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 品牌,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <ComboBox
- Grid.Row="2"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:RobotBrand}"
- SelectedItem="{Binding SelectRobot.RobotBrand, Mode=TwoWay}" />
- <!-- 通讯方式 -->
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 通讯方式,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}"
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
- <ComboBox
- Grid.Row="3"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:TCPConnectType}"
- SelectedItem="{Binding SelectRobot.ConnectType, Mode=TwoWay}"
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
- <!-- IP地址 -->
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="IP: "
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
- <TextBox
- Grid.Row="4"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center"
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="SelectRobot.IP">
- <Binding.ValidationRules>
- <valRules:IPValidationRule />
- </Binding.ValidationRules>
- </Binding>
- </TextBox.Text>
- </TextBox>
- <!-- 端口号 -->
- <TextBlock
- Grid.Row="5"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="Port: "
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
- <TextBox
- Grid.Row="5"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center"
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="SelectRobot.Port">
- <Binding.ValidationRules>
- <valRules:PortValidationRule />
- </Binding.ValidationRules>
- </Binding>
- </TextBox.Text>
- </TextBox>
- <!-- 结束符 -->
- <TextBlock
- Grid.Row="6"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 结束符,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}"
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
- <ComboBox
- Grid.Row="6"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:Terminator}"
- SelectedItem="{Binding SelectRobot.Terminator, Mode=TwoWay}"
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
- <!-- 编码格式 -->
- <TextBlock
- Grid.Row="7"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 编码解码,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}"
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
- <ComboBox
- Grid.Row="7"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:DataEncoding}"
- SelectedItem="{Binding SelectRobot.DataEncoding, Mode=TwoWay}"
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
- <!-- Z轴的安全高度 -->
- <TextBlock
- Grid.Row="8"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="Z轴的安全高度: " />
- <TextBox
- Grid.Row="8"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{Binding SelectRobot.SafeZ, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="8"
- Grid.Column="1"
- Margin="0,0,-20,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="mm" />
- <!-- PLC -->
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- d:Visibility="Collapsed"
- Text="PLC: "
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverterInverse}}" />
- <ComboBox
- Grid.Row="3"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,5"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- d:Visibility="Collapsed"
- ItemsSource="{Binding PlcList}"
- SelectedItem="{Binding RobotSelectedPlc}"
- Visibility="{Binding SelectRobot.RobotBrand, Converter={StaticResource RobotBrandToVisibiltyConverterInverse}}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Name}" />
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <!--<ScrollViewer Grid.RowSpan="8"
- Grid.Column="2"
- HorizontalScrollBarVisibility="Auto"
- VerticalScrollBarVisibility="Auto"
- d:Visibility="Collapsed"
- Visibility="{Binding SelectRobot.RobotBrand,Converter={StaticResource RobotBrandToVisibiltyConverterInverse}}">
- <Grid Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.Resources>
- <Style TargetType="TextBlock">
- <Setter Property="FontSize"
- Value="{DynamicResource Font.Size.Body3}" />
- <Setter Property="Margin"
- Value="5" />
- <Setter Property="VerticalAlignment"
- Value="Center" />
- </Style>
- <Style TargetType="TextBox">
- <Setter Property="FontSize"
- Value="{DynamicResource Font.Size.Body3}" />
- <Setter Property="Margin"
- Value="5" />
- <Setter Property="HorizontalAlignment"
- Value="Stretch" />
- <Setter Property="VerticalAlignment"
- Value="Center" />
- </Style>
- </Grid.Resources>
- <TextBlock Grid.Row="0"
- FontWeight="Bold"
- Text="{lex:Loc 状态参数, Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <TextBlock Grid.Row="1"
- Text="{lex:Loc X坐标}" />
- <DockPanel Grid.Row="1"
- Grid.Column="1"
- LastChildFill="True">
- <TextBlock Text="{Binding ResultsValues[0]}"
- MinWidth="50" />
- <TextBox Text="{Binding SelectRobot.PlcRobotParameter.StateParameter.X}" />
- </DockPanel>
- <TextBlock Grid.Row="2"
- Text="{lex:Loc Y坐标}" />
- <DockPanel Grid.Row="2"
- Grid.Column="1"
- LastChildFill="True">
- <TextBlock Text="{Binding ResultsValues[1]}"
- MinWidth="50" />
- <TextBox Text="{Binding SelectRobot.PlcRobotParameter.StateParameter.Y}" />
- </DockPanel>
- <TextBlock Grid.Row="3"
- Text="{lex:Loc Z坐标}" />
- <DockPanel Grid.Row="3"
- Grid.Column="1"
- LastChildFill="True">
- <TextBlock Text="{Binding ResultsValues[2]}"
- MinWidth="50" />
- <TextBox Text="{Binding SelectRobot.PlcRobotParameter.StateParameter.Z}" />
- </DockPanel>
- <TextBlock Grid.Row="4"
- Text="{lex:Loc U坐标}" />
- <DockPanel Grid.Row="4"
- Grid.Column="1"
- LastChildFill="True">
- <TextBlock Text="{Binding ResultsValues[3]}"
- MinWidth="50" />
- <TextBox Text="{Binding SelectRobot.PlcRobotParameter.StateParameter.U}" />
- </DockPanel>
- <TextBlock Grid.Row="5"
- Text="{lex:Loc 运动结束}" />
- <DockPanel Grid.Row="5"
- Grid.Column="1"
- LastChildFill="True">
- <TextBlock Text="{Binding ResultsValues[4]}"
- MinWidth="50" />
- <TextBox Text="{Binding SelectRobot.PlcRobotParameter.StateParameter.MoveFinish}" />
- </DockPanel>
- <TextBlock Grid.Row="6"
- Text="{lex:Loc 错误}" />
- <DockPanel Grid.Row="6"
- Grid.Column="1"
- LastChildFill="True">
- <TextBlock Text="{Binding ResultsValues[5]}"
- MinWidth="50" />
- <TextBox Text="{Binding SelectRobot.PlcRobotParameter.StateParameter.Error}" />
- </DockPanel>
- <TextBlock Grid.Row="7"
- Text="{lex:Loc 吸真空,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}:'}" />
- <DockPanel Grid.Row="7"
- Grid.Column="1"
- LastChildFill="True">
- <TextBlock Text="{Binding ResultsValues[6]}"
- MinWidth="50" />
- <TextBox Text="{Binding SelectRobot.PlcRobotParameter.StateParameter.VacuumOn}" />
- </DockPanel>
- <TextBlock Grid.Row="8"
- Text="{lex:Loc 破真空,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}:'}" />
- <DockPanel Grid.Row="8"
- Grid.Column="1"
- LastChildFill="True">
- <TextBlock Text="{Binding ResultsValues[7]}"
- MinWidth="50" />
- <TextBox Text="{Binding SelectRobot.PlcRobotParameter.StateParameter.VacuumOff}" />
- </DockPanel>
- <TextBlock Grid.Row="9"
- FontWeight="Bold"
- Text="{lex:Loc 命令参数, Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <TextBlock Grid.Row="10"
- Text="{lex:Loc X坐标}" />
- <TextBox Grid.Row="10"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.X}" />
- <TextBlock Grid.Row="11"
- Text="{lex:Loc Y坐标}" />
- <TextBox Grid.Row="11"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.Y}" />
- <TextBlock Grid.Row="12"
- Text="{lex:Loc Z坐标}" />
- <TextBox Grid.Row="12"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.Z}" />
- <TextBlock Grid.Row="13"
- Text="{lex:Loc U坐标}" />
- <TextBox Grid.Row="13"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.U}" />
- <TextBlock Grid.Row="14"
- Text="{lex:Loc 吸真空时长,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}:'}" />
- <TextBox Grid.Row="14"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.WaitVacuumOn}" />
- <TextBlock Grid.Row="15"
- Text="{lex:Loc 破真空时长,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}:'}" />
- <TextBox Grid.Row="15"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.WaitVacuumOff}" />
- <TextBlock Grid.Row="16"
- Text="{lex:Loc Z轴限高}" />
- <TextBox Grid.Row="16"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.Limz}" />
- <TextBlock Grid.Row="17"
- Text="{lex:Loc 执行运动}" />
- <TextBox Grid.Row="17"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.ExecuteMove}" />
- <TextBlock Grid.Row="18"
- Text="{lex:Loc 吸真空}" />
- <TextBox Grid.Row="18"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.VacuumOn}" />
- <TextBlock Grid.Row="19"
- Text="{lex:Loc 破真空}" />
- <TextBox Grid.Row="19"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.VacuumOff}" />
- <TextBlock Grid.Row="20"
- Text="{lex:Loc 步进距离,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}:'}" />
- <TextBox Grid.Row="20"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.Distance}" />
- <TextBlock Grid.Row="21"
- Text="{lex:Loc 点动命令,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}:'}" />
- <TextBox Grid.Row="21"
- Grid.Column="1"
- Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.JogCmd}" />
- </Grid>
- </ScrollViewer>-->
- </Grid>
- </ScrollViewer>
- </Grid>
- </TabItem>
- <!-- Feeder -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="Vibrate" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="Feeder" />
- </StackPanel>
- </TabItem.Header>
- <Grid Margin="16">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- 增删改查 -->
- <StackPanel
- Grid.ColumnSpan="2"
- IsEnabled="{Binding IsAllowEdit}"
- Orientation="Horizontal">
- <Button
- Command="{Binding AddFeederCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
- ToolTip="{lex:Loc 增加Feeder}">
- <materialDesign:PackIcon Kind="Plus" />
- </Button>
- <Button
- Margin="20,0"
- Command="{Binding RemoveFeederCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
- ToolTip="{lex:Loc 移除Feeder}">
- <materialDesign:PackIcon Kind="DeleteForeverOutline" />
- </Button>
- <Button
- Command="{Binding SaveFeedersCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniSecondaryDarkButton}"
- ToolTip="{lex:Loc 保存}">
- <materialDesign:PackIcon Kind="ContentSaveCheck" />
- </Button>
- </StackPanel>
- <!-- Feeder列表 -->
- <TreeView
- Grid.Row="1"
- Grid.Column="0"
- SelectedItemChanged="TreeView_SelectedItemChanged">
- <TreeViewItem
- FontSize="{DynamicResource Font.Size.Title4}"
- FontWeight="Bold"
- Header="{lex:Loc Feeder列表}"
- IsExpanded="True"
- ItemsSource="{Binding FeederList}">
- <TreeViewItem.ItemTemplate>
- <HierarchicalDataTemplate>
- <StackPanel Orientation="Vertical">
- <TextBlock FontSize="{DynamicResource Font.Size.Title4}">
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}. {1}">
- <Binding Path="FeederNo" />
- <Binding Path="FeederName" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 品牌,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding FeederBrand, Mode=TwoWay}" />
- <TextBlock
- Margin="10,0,0,0"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 连接方式,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding ConnectType, Mode=TwoWay}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding IP, StringFormat=IP:{0}, Mode=TwoWay}" />
- <TextBlock
- Margin="10,0"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding Port, StringFormat=Port:{0}, Mode=TwoWay}" />
- </StackPanel>
- <Border
- Height="2"
- Margin="0"
- BorderBrush="Green"
- BorderThickness="2" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeViewItem.ItemTemplate>
- </TreeViewItem>
- </TreeView>
- <!-- 参数详情 -->
- <ScrollViewer
- Grid.Row="1"
- Grid.Column="1"
- Margin="20"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- IsEnabled="{Binding IsAllowEdit}"
- Visibility="{Binding SelectFeeder, Converter={StaticResource ObjectToVisibilityConverter}}">
- <Grid Height="300">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- id -->
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="Id: " />
- <TextBlock
- x:Name="txt_Feeder_Id"
- Grid.Row="0"
- Grid.Column="1"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{Binding SelectFeeder.Id, Mode=TwoWay}" />
- <!-- 名称 -->
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 名称,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Feeder_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="SelectFeeder.FeederName">
- <Binding.ValidationRules>
- <valRules:NameValidationRule />
- </Binding.ValidationRules>
- </Binding>
- </TextBox.Text>
- </TextBox>
- <!-- Feeder品牌 -->
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 品牌,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <ComboBox
- Grid.Row="2"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Feeder_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums1:FeederBrand}"
- SelectedItem="{Binding SelectFeeder.FeederBrand, Mode=TwoWay}" />
- <!-- 通讯方式 -->
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 通讯方式,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <ComboBox
- Grid.Row="3"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Feeder_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:TCPConnectType}"
- SelectedItem="{Binding SelectFeeder.ConnectType, Mode=TwoWay}" />
- <!-- IP地址 -->
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="IP: " />
- <TextBox
- Grid.Row="4"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Feeder_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="SelectFeeder.IP">
- <Binding.ValidationRules>
- <valRules:IPValidationRule />
- </Binding.ValidationRules>
- </Binding>
- </TextBox.Text>
- </TextBox>
- <!-- 端口号 -->
- <TextBlock
- Grid.Row="5"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="Port: " />
- <TextBox
- Grid.Row="5"
- Grid.Column="1"
- Width="{Binding ElementName=txt_Feeder_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="SelectFeeder.Port">
- <Binding.ValidationRules>
- <valRules:PortValidationRule />
- </Binding.ValidationRules>
- </Binding>
- </TextBox.Text>
- </TextBox>
- </Grid>
- </ScrollViewer>
- </Grid>
- </TabItem>
- <!-- PLC -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="CellphoneLink" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="PLC" />
- </StackPanel>
- </TabItem.Header>
- <Grid Margin="16">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- 增删改查 -->
- <StackPanel
- Grid.ColumnSpan="2"
- IsEnabled="{Binding IsAllowEdit}"
- Orientation="Horizontal">
- <Button
- Command="{Binding AddPlcCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
- ToolTip="{lex:Loc 增加PLC}">
- <materialDesign:PackIcon Kind="Plus" />
- </Button>
- <Button
- Margin="20,0"
- Command="{Binding RemovePlcCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
- ToolTip="{lex:Loc 移除PLC}">
- <materialDesign:PackIcon Kind="DeleteForeverOutline" />
- </Button>
- <Button
- Command="{Binding SavePlcsCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniSecondaryDarkButton}"
- ToolTip="{lex:Loc 保存}">
- <materialDesign:PackIcon Kind="ContentSaveCheck" />
- </Button>
- </StackPanel>
- <!-- PLC列表 -->
- <TreeView
- Grid.Row="1"
- Grid.Column="0"
- SelectedItemChanged="TreeView_SelectedItemChanged">
- <TreeViewItem
- FontSize="{DynamicResource Font.Size.Title4}"
- FontWeight="Bold"
- Header="{lex:Loc PLC列表}"
- IsExpanded="True"
- ItemsSource="{Binding PlcList}">
- <TreeViewItem.ItemTemplate>
- <HierarchicalDataTemplate>
- <StackPanel Orientation="Vertical">
- <TextBlock FontSize="{DynamicResource Font.Size.Title4}" Text="{Binding Name, Mode=TwoWay}" />
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Margin="10,0,0,0"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 连接方式,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding CommunicationType, Mode=TwoWay}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding EndpointUrl, StringFormat=Endpoint Url:{0}, Mode=TwoWay}" />
- </StackPanel>
- <Border
- Height="2"
- Margin="0"
- BorderBrush="Green"
- BorderThickness="2" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeViewItem.ItemTemplate>
- </TreeViewItem>
- </TreeView>
- <!-- 参数详情 -->
- <ScrollViewer
- Grid.Row="1"
- Grid.Column="1"
- Margin="20"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- IsEnabled="{Binding IsAllowEdit}"
- Visibility="{Binding SelectPlc, Converter={StaticResource ObjectToVisibilityConverter}}">
- <Grid Height="200">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- id -->
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="Id: " />
- <TextBlock
- x:Name="txt_plc_Id"
- Grid.Row="0"
- Grid.Column="1"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{Binding SelectPlc.Id, Mode=TwoWay}" />
- <!-- 名称 -->
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 名称,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Width="{Binding ElementName=txt_plc_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="SelectPlc.Name">
- <Binding.ValidationRules>
- <valRules:NameValidationRule />
- </Binding.ValidationRules>
- </Binding>
- </TextBox.Text>
- </TextBox>
- <!-- 通讯方式 -->
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 通讯方式,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <ComboBox
- Grid.Row="2"
- Grid.Column="1"
- Width="{Binding ElementName=txt_plc_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:CommunicationType}"
- SelectedItem="{Binding SelectPlc.CommunicationType, Mode=TwoWay}" />
- <!-- Endpoint Url地址 -->
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="Endpoints Url: " />
- <TextBox
- Grid.Row="3"
- Grid.Column="1"
- Width="{Binding ElementName=txt_plc_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{Binding SelectPlc.EndpointUrl}"
- TextAlignment="Center" />
- <!-- 节点头 -->
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 节点头,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBox
- Grid.Row="4"
- Grid.Column="1"
- Width="{Binding ElementName=txt_plc_Id, Path=ActualWidth}"
- MinWidth="80"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{Binding SelectPlc.NodeHeader, Mode=TwoWay}"
- TextAlignment="Center" />
- </Grid>
- </ScrollViewer>
- </Grid>
- </TabItem>
- <!-- 光源控制器 -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="TelevisionAmbientLight" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="{lex:Loc 光源控制器}" />
- </StackPanel>
- </TabItem.Header>
- <Grid Margin="16">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- 增删改查 -->
- <StackPanel
- Grid.ColumnSpan="2"
- IsEnabled="{Binding IsAllowEdit}"
- Orientation="Horizontal">
- <Button
- Command="{Binding AddLightControllerCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
- ToolTip="{lex:Loc 增加光源控制器}">
- <materialDesign:PackIcon Kind="Plus" />
- </Button>
- <Button
- Margin="20,0"
- Command="{Binding RemoveLightControllerCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
- ToolTip="{lex:Loc 移除光源控制器}">
- <materialDesign:PackIcon Kind="DeleteForeverOutline" />
- </Button>
- <Button
- Command="{Binding SaveLightControllersCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniSecondaryDarkButton}"
- ToolTip="{lex:Loc 保存}">
- <materialDesign:PackIcon Kind="ContentSaveCheck" />
- </Button>
- </StackPanel>
- <!-- 控制器列表 -->
- <TreeView
- Grid.Row="1"
- Grid.Column="0"
- SelectedItemChanged="TreeView_SelectedItemChanged">
- <TreeViewItem
- FontSize="{DynamicResource Font.Size.Title4}"
- FontWeight="Bold"
- Header="{lex:Loc 光源控制器列表}"
- IsExpanded="True"
- ItemsSource="{Binding LightControllerList}">
- <TreeViewItem.ItemTemplate>
- <HierarchicalDataTemplate>
- <StackPanel Orientation="Vertical">
- <TextBlock FontSize="{DynamicResource Font.Size.Title4}">
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}. {1}">
- <Binding Path="Id" />
- <Binding Path="Name" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Margin="10,0,0,0"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 型号,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding LightModel, Mode=TwoWay}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Margin="10,0,0,0"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 通道数,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding ChannelCount, Mode=TwoWay}" />
- </StackPanel>
- <Border
- Height="2"
- Margin="0"
- BorderBrush="Green"
- BorderThickness="2" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeViewItem.ItemTemplate>
- </TreeViewItem>
- </TreeView>
- <!-- 参数详情 -->
- <ScrollViewer
- Grid.Row="1"
- Grid.Column="1"
- Margin="20"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- IsEnabled="{Binding IsAllowEdit}"
- Visibility="{Binding SelectLightController, Converter={StaticResource ObjectToVisibilityConverter}}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" MinWidth="200" />
- </Grid.ColumnDefinitions>
- <!-- Id -->
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="Id: " />
- <TextBlock
- Grid.Row="0"
- Grid.Column="1"
- Margin="10,0"
- VerticalAlignment="Center"
- Text="{Binding SelectLightController.Id}" />
- <!-- Name -->
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 名称,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Margin="10,0"
- Text="{Binding SelectLightController.Name, Mode=TwoWay}" />
- <!-- Model -->
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 型号,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <ComboBox
- Grid.Row="2"
- Grid.Column="1"
- Margin="10,0"
- ItemsSource="{ext:EnumBindingSource EnumType=coreLights:LightModel}"
- SelectedItem="{Binding SelectLightController.LightModel, Mode=TwoWay}">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="SelectionChanged">
- <b:InvokeCommandAction Command="{Binding LightModelChangedCommand}" CommandParameter="{Binding SelectLightController}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- </ComboBox>
- <!-- Channel count -->
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 通道数,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBox
- Grid.Row="3"
- Grid.Column="1"
- Margin="10,0"
- IsReadOnly="True"
- Text="{Binding SelectLightController.ChannelCount, Mode=TwoWay}" />
- <!-- Channel configs list -->
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 通道配置}" />
- <ItemsControl
- Grid.Row="4"
- Grid.Column="1"
- Margin="10,0"
- ItemsSource="{Binding SelectLightController.ChannelConfigs}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel Margin="0,4" Orientation="Horizontal">
- <TextBlock
- Width="30"
- VerticalAlignment="Center"
- Text="{Binding LocalIndex}" />
- <TextBox
- Width="180"
- Margin="6,0"
- Text="{Binding Name, Mode=TwoWay}" />
- <TextBlock
- Margin="6,0"
- VerticalAlignment="Center"
- Text="{lex:Loc 亮度}" />
- <TextBox Width="80" Text="{Binding DefaultBrightness, Mode=TwoWay}" />
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- <!-- Serial port config (visible for serial model) -->
- <GroupBox
- Grid.Row="5"
- Grid.ColumnSpan="2"
- Margin="0,12,0,0"
- Header="{lex:Loc 串口配置}">
- <GroupBox.Style>
- <Style TargetType="GroupBox">
- <Setter Property="Visibility" Value="Collapsed" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding SelectLightController.LightModel}" Value="{x:Static coreLights:LightModel.KCS_KDC_12V60W_4T}">
- <Setter Property="Visibility" Value="Visible" />
- </DataTrigger>
- <DataTrigger Binding="{Binding SelectLightController.LightModel}" Value="{x:Static coreLights:LightModel.KCS_KDC3_24V300W_8T}">
- <Setter Property="Visibility" Value="Visible" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </GroupBox.Style>
- <Grid Margin="10">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="PortName:" />
- <TextBox
- Grid.Row="0"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding SelectLightController.SerialPortConfig.PortName, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="BaudRate:" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding SelectLightController.SerialPortConfig.BaudRate, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="Parity:" />
- <ComboBox
- Grid.Row="2"
- Grid.Column="1"
- ItemsSource="{Binding Source={StaticResource Parity}}"
- SelectedItem="{Binding SelectLightController.SerialPortConfig.Parity, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="StopBits:" />
- <ComboBox
- Grid.Row="3"
- Grid.Column="1"
- ItemsSource="{Binding Source={StaticResource StopBits}}"
- SelectedItem="{Binding SelectLightController.SerialPortConfig.StopBits, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="DataBits:" />
- <TextBox
- Grid.Row="4"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding SelectLightController.SerialPortConfig.DataBits, Mode=TwoWay}" />
- </Grid>
- </GroupBox>
- <!-- TCP config (visible for non-serial models) -->
- <GroupBox
- Grid.Row="5"
- Grid.ColumnSpan="2"
- Margin="0,12,0,0"
- Header="{lex:Loc TCP配置}">
- <GroupBox.Style>
- <Style TargetType="GroupBox">
- <Setter Property="Visibility" Value="Visible" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding SelectLightController.LightModel}" Value="{x:Static coreLights:LightModel.KCS_KDC_12V60W_4T}">
- <Setter Property="Visibility" Value="Collapsed" />
- </DataTrigger>
- <DataTrigger Binding="{Binding SelectLightController.LightModel}" Value="{x:Static coreLights:LightModel.KCS_KDC3_24V300W_8T}">
- <Setter Property="Visibility" Value="Collapsed" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </GroupBox.Style>
- <Grid Margin="10">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="IP:" />
- <TextBox
- Grid.Row="0"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding SelectLightController.TcpConfig.IP, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="Port:" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding SelectLightController.TcpConfig.Port, Mode=TwoWay}" />
- </Grid>
- </GroupBox>
- </Grid>
- </ScrollViewer>
- </Grid>
- </TabItem>
- <!-- 螺丝供料器 -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="Screwdriver" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="{lex:Loc 螺丝供料器}" />
- </StackPanel>
- </TabItem.Header>
- <Grid Margin="16">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- 增删改查 -->
- <StackPanel
- Grid.ColumnSpan="2"
- IsEnabled="{Binding IsAllowEdit}"
- Orientation="Horizontal">
- <Button
- Command="{Binding AddScrewFeederCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
- ToolTip="{lex:Loc 增加螺丝供料器}">
- <materialDesign:PackIcon Kind="Plus" />
- </Button>
- <Button
- Margin="20,0"
- Command="{Binding RemoveScrewFeederCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
- ToolTip="{lex:Loc 移除螺丝供料器}">
- <materialDesign:PackIcon Kind="DeleteForeverOutline" />
- </Button>
- <Button
- Command="{Binding SaveScrewFeedersCommand}"
- Style="{StaticResource MaterialDesignFloatingActionMiniSecondaryDarkButton}"
- ToolTip="{lex:Loc 保存}">
- <materialDesign:PackIcon Kind="ContentSaveCheck" />
- </Button>
- </StackPanel>
- <!-- 螺丝供料器列表 -->
- <TreeView
- Grid.Row="1"
- Grid.Column="0"
- SelectedItemChanged="TreeView_SelectedItemChanged">
- <TreeViewItem
- FontSize="{DynamicResource Font.Size.Title4}"
- FontWeight="Bold"
- Header="{lex:Loc 螺丝供料器列表}"
- IsExpanded="True"
- ItemsSource="{Binding ScrewFeederList}">
- <TreeViewItem.ItemTemplate>
- <HierarchicalDataTemplate>
- <StackPanel Orientation="Vertical">
- <TextBlock FontSize="{DynamicResource Font.Size.Title4}">
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0} . {1}">
- <Binding Path="FeederNumber" />
- <Binding Path="Name" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Margin="10,0,0,0"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 每包螺丝的数量}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding PackSize, Mode=TwoWay}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Margin="10,0,0,0"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 低量报警阈值}" />
- <TextBlock
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{Binding LowLevelThreshold, Mode=TwoWay}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Margin="10,0,0,0"
- FontSize="{DynamicResource Font.Size.Captions3}"
- Style="{StaticResource MaterialDesignCaptionTextBlock}"
- Text="{lex:Loc 是否启用低量报警}" />
- <CheckBox
- FontSize="{DynamicResource Font.Size.Captions3}"
- IsChecked="{Binding LowLevelAlarmEnabled, Mode=TwoWay}"
- IsEnabled="False" />
- </StackPanel>
- <Border
- Height="2"
- Margin="0"
- BorderBrush="Green"
- BorderThickness="2" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeViewItem.ItemTemplate>
- </TreeViewItem>
- </TreeView>
- <!-- 参数详情 -->
- <ScrollViewer
- Grid.Row="1"
- Grid.Column="1"
- Margin="20"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- IsEnabled="{Binding IsAllowEdit}"
- Visibility="{Binding SelectScrewFeeder, Converter={StaticResource ObjectToVisibilityConverter}}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="40" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition MinWidth="200" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- Id -->
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="Id: " />
- <TextBlock
- Grid.Row="0"
- Grid.Column="1"
- Margin="10,0"
- VerticalAlignment="Center"
- Text="{Binding SelectScrewFeeder.Id}" />
- <!-- Name -->
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 名称,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Margin="10,0"
- Text="{Binding SelectScrewFeeder.Name, Mode=TwoWay}" />
- <!-- 供料器编号 -->
- <!--<TextBlock Text="供料器编号:"
- Grid.Row="2"
- Grid.Column="0"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- HorizontalAlignment="Right"
- VerticalAlignment="Center" />
- <TextBox Text="{Binding SelectScrewFeeder.FeederNumber,Mode=TwoWay}"
- Grid.Row="2"
- Grid.Column="1"
- Margin="10,0"
- Width="200"
- TextAlignment="Center" />-->
- <!-- 每包螺丝数量 -->
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 每包螺丝数量}" />
- <mah:NumericUpDown
- Grid.Row="3"
- Grid.Column="1"
- MinWidth="200"
- Margin="10,5"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="10000"
- Minimum="0"
- Value="{Binding SelectScrewFeeder.PackSize, Mode=TwoWay}" />
- <!-- 低量报警阈值 -->
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 低量报警阈值}" />
- <mah:NumericUpDown
- Grid.Row="4"
- Grid.Column="1"
- MinWidth="200"
- Margin="10,0"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="10000"
- Minimum="0"
- Value="{Binding SelectScrewFeeder.LowLevelThreshold, Mode=TwoWay}" />
- <!-- 是否启用低量报警 -->
- <TextBlock
- Grid.Row="5"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="是否启用低量报警:" />
- <CheckBox
- Grid.Row="5"
- Grid.Column="1"
- Margin="10,5"
- VerticalAlignment="Center"
- IsChecked="{Binding SelectScrewFeeder.LowLevelAlarmEnabled, Mode=TwoWay}" />
- </Grid>
- </ScrollViewer>
- </Grid>
- </TabItem>
- <!-- 通讯 -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="Lan" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="{lex:Loc 通讯}" />
- </StackPanel>
- </TabItem.Header>
- <Grid Margin="20" IsEnabled="{Binding IsAllowEdit}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height=" auto" />
- </Grid.RowDefinitions>
- <Button
- Width="60"
- HorizontalAlignment="Left"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SaveCommunicateCommand}"
- CommandParameter="TCPIP"
- Style="{StaticResource MaterialDesignRaisedButton}"
- ToolTip="{lex:Loc 保存}">
- <materialDesign:PackIcon Kind="ContentSaveCheck" />
- </Button>
- <GroupBox
- Grid.Row="1"
- Margin="5,5"
- FontSize="{DynamicResource Font.Size.Title4}"
- Header="{lex:Loc 后台TCPIP服务器}">
- <Grid Margin="20">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height=" auto" />
- <RowDefinition Height=" auto" />
- </Grid.RowDefinitions>
- <!-- port -->
- <TextBlock
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="Port: " />
- <TextBox
- Grid.Row="0"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="BgTcp.Port">
- <Binding.ValidationRules>
- <valRules:PortValidationRule />
- </Binding.ValidationRules>
- </Binding>
- </TextBox.Text>
- </TextBox>
- <!-- 结束符 -->
- <TextBlock
- Grid.Row="1"
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{lex:Loc 结束符,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <ComboBox
- Grid.Row="1"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:Terminator}"
- SelectedItem="{Binding BgTcp.Terminator, Mode=TwoWay}" />
- <!-- 编码格式 -->
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- Text="{lex:Loc 编码解码,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <ComboBox
- Grid.Row="2"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:DataEncoding}"
- SelectedItem="{Binding BgTcp.DataEncoding, Mode=TwoWay}" />
- </Grid>
- </GroupBox>
- <Button
- Grid.Column="1"
- Width="60"
- HorizontalAlignment="Left"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SaveCommunicateCommand}"
- CommandParameter="ModbusTCP"
- Style="{StaticResource MaterialDesignRaisedButton}"
- ToolTip="{lex:Loc 保存}">
- <materialDesign:PackIcon Kind="ContentSaveCheck" />
- </Button>
- <materialDesign:PopupBox
- Grid.Column="1"
- HorizontalAlignment="Right"
- VerticalAlignment="Center">
- <StackPanel Margin="10" Orientation="Vertical">
- <TextBlock
- Text="功能码 1 ReadCoils 读取DO的状态"
- TextAlignment="Left"
- TextWrapping="Wrap" />
- <TextBlock
- Text="功能码 2 ReadInputs 读取DI的状态"
- TextAlignment="Left"
- TextWrapping="Wrap" />
- <TextBlock
- Text="功能码 3 ReadHoldingRegisters 读取AO的值"
- TextAlignment="Left"
- TextWrapping="Wrap" />
- <TextBlock
- Text="功能码 4 ReadInputRegisters 读取AI的值"
- TextAlignment="Left"
- TextWrapping="Wrap" />
- <TextBlock
- Text="功能码 5 WriteSingleCoil 写入值到DO"
- TextAlignment="Left"
- TextWrapping="Wrap" />
- <TextBlock
- Text="功能码 6 WriteSingleRegister 写入值到AO"
- TextAlignment="Left"
- TextWrapping="Wrap" />
- <TextBlock
- Text="功能码 15 WriteMultipleCoils 写多线圈寄存器"
- TextAlignment="Left"
- TextWrapping="Wrap" />
- <TextBlock
- Text="功能码 16 WriteMultipleRegisters 写多个保持寄存器"
- TextAlignment="Left"
- TextWrapping="Wrap" />
- <TextBlock
- Text="功能码 23 ReadWriteMultipleRegisters 读写多个保持寄存器"
- TextAlignment="Left"
- TextWrapping="Wrap" />
- </StackPanel>
- </materialDesign:PopupBox>
- <GroupBox
- Grid.Row="1"
- Grid.Column="1"
- Margin="5,5"
- FontSize="{DynamicResource Font.Size.Title4}"
- Header="{lex:Loc 后台ModbusTCPSlave}">
- <Grid Margin="20">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height=" auto" />
- <RowDefinition Height=" auto" />
- <RowDefinition Height=" auto" />
- </Grid.RowDefinitions>
- <!-- IP -->
- <TextBlock
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="IP: " />
- <TextBox
- Grid.Row="0"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{Binding BgModbus.IP, Mode=TwoWay}"
- TextAlignment="Center" />
- <!-- port -->
- <TextBlock
- Grid.Row="1"
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="Port: " />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{Binding BgModbus.Port, Mode=TwoWay}"
- TextAlignment="Center" />
- <!-- SlaveID -->
- <TextBlock
- Grid.Row="2"
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="SlaveID: " />
- <TextBox
- Grid.Row="2"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{Binding BgModbus.SlaveID, Mode=TwoWay}"
- TextAlignment="Center" />
- <!-- 是否启用 -->
- <TextBlock
- Grid.Row="3"
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="{lex:Loc 是否启用,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}: '}" />
- <ToggleButton
- Grid.Row="3"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- IsChecked="{Binding BgModbus.IsEnabled, Mode=TwoWay}" />
- </Grid>
- </GroupBox>
- </Grid>
- </TabItem>
- <!-- 系统参数 -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="CellphoneSystemUpdate" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="{lex:Loc 系统参数}" />
- </StackPanel>
- </TabItem.Header>
- <StackPanel Margin="20" Orientation="Vertical">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="16" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="20" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid Margin="16">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="220" />
- <ColumnDefinition Width="260" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <!-- 下相机拍照次数 -->
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="{lex:Loc 下相机拍照次数}" />
- <mah:NumericUpDown
- Grid.Row="0"
- Grid.Column="1"
- Margin="0,6"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="100"
- Minimum="0"
- Value="{Binding DowmCameraNum, Mode=TwoWay}" />
- <!-- 上相机取料拍照次数 -->
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="{lex:Loc 上相机取料拍照次数}" />
- <mah:NumericUpDown
- Grid.Row="1"
- Grid.Column="1"
- Margin="0,6"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="100"
- Minimum="0"
- Value="{Binding UpCameraPickNum, Mode=TwoWay}" />
- <!-- 上相机放料拍照次数 -->
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="{lex:Loc 上相机放料拍照次数}" />
- <mah:NumericUpDown
- Grid.Row="2"
- Grid.Column="1"
- Margin="0,6"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="100"
- Minimum="0"
- Value="{Binding UpCameraPutNum, Mode=TwoWay}" />
- <!-- 上相机锁附/组装次数(复检) -->
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="上相机锁附/组装次数(复检)" />
- <mah:NumericUpDown
- Grid.Row="3"
- Grid.Column="1"
- Margin="0,6"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="100"
- Minimum="0"
- Value="{Binding UPCameracheckNum, Mode=TwoWay}" />
- <!-- 取料固定位置拍产品相机数量 -->
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="{lex:Loc 取料固定位置拍产品相机数量}" />
- <mah:NumericUpDown
- Grid.Row="4"
- Grid.Column="1"
- Margin="0,6"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="10"
- Minimum="0"
- Value="{Binding FixedCameraPickNum, Mode=TwoWay}" />
- <!-- 锁附/组装固定位置拍产品相机数量 -->
- <TextBlock
- Grid.Row="5"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="{lex:Loc 锁附组装固定位置拍产品相机数量}" />
- <mah:NumericUpDown
- Grid.Row="5"
- Grid.Column="1"
- Margin="0,6"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="10"
- Minimum="0"
- Value="{Binding FixedCameraPutNum, Mode=TwoWay}" />
- <!-- 固定相机检测锁附/组装次数 -->
- <TextBlock
- Grid.Row="6"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="{lex:Loc 固定相机检测锁附组装次数}" />
- <mah:NumericUpDown
- Grid.Row="6"
- Grid.Column="1"
- Margin="0,6"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="100"
- Minimum="0"
- Value="{Binding FixedCameracheckNum, Mode=TwoWay}" />
- <!-- 工作模式 -->
- <TextBlock
- Grid.Row="7"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="{lex:Loc 工作模式}" />
- <mah:NumericUpDown
- Grid.Row="7"
- Grid.Column="1"
- Margin="0,6"
- materialDesign:HintAssist.HelperText="1:拍1打1 2:拍1打所有"
- materialDesign:HintAssist.HelperTextFontSize="10"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="100"
- Minimum="0"
- Value="{Binding WorkMode, Mode=TwoWay}" />
- <!-- 固定相机检测锁附/组装次数 -->
- <TextBlock Grid.Row="6"
- Grid.Column="0"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- VerticalAlignment="Center"
- HorizontalAlignment="Right"
- Margin="0,6,10,6"
- Text="{lex:Loc 固定相机检测锁附组装次数}" />
- <mah:NumericUpDown Grid.Row="6"
- Grid.Column="1"
- Margin="0,6"
- Value="{Binding FixedCameracheckNum,Mode=TwoWay}"
- Minimum="0"
- Maximum="100"
- FontSize="{DynamicResource Font.Size.Body3}" />
- <!-- 工作模式 -->
- <TextBlock Grid.Row="7"
- Grid.Column="0"
- Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
- VerticalAlignment="Center"
- HorizontalAlignment="Right"
- Margin="0,6,10,6"
- Text="{lex:Loc 工作模式}" />
- <mah:NumericUpDown Grid.Row="7"
- Grid.Column="1"
- Margin="0,10"
- Value="{Binding WorkMode,Mode=TwoWay}"
- Minimum="0"
- Maximum="100"
- FontSize="{DynamicResource Font.Size.Body3}"
- materialDesign:HintAssist.HelperTextFontSize="10"
- materialDesign:HintAssist.HelperText="1:拍1打1 - 2:拍2打所有 - 3:先拍1打1打3颗再拍2打所有" />
- <!-- 取料位置 -->
- <TextBlock
- Grid.Row="8"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="{lex:Loc 取料位置}" />
- <mah:NumericUpDown
- Grid.Row="8"
- Grid.Column="1"
- Margin="0,6"
- materialDesign:HintAssist.HelperText="0:不需要取料 1:需要取料"
- materialDesign:HintAssist.HelperTextFontSize="10"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="100"
- Minimum="0"
- Value="{Binding PickPointNum, Mode=TwoWay}" />
- <!-- 批头矫正模式 -->
- <TextBlock
- Grid.Row="9"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="批头矫正模式" />
- <mah:NumericUpDown
- Grid.Row="9"
- Grid.Column="1"
- Margin="0,6"
- materialDesign:HintAssist.HelperText="1:初始化时矫正 2:每个产品矫正一次 3:每颗螺丝矫正一次"
- materialDesign:HintAssist.HelperTextFontSize="10"
- FontSize="{DynamicResource Font.Size.Body3}"
- Maximum="100"
- Minimum="0"
- ToolTip="1:初始化时矫正,2:每个产品矫正一次,3:每颗螺丝矫正一次"
- Value="{Binding ScrewTeachNum, Mode=TwoWay}" />
- <!-- 保存锁付曲线 -->
- <TextBlock
- Grid.Row="10"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Center"
- Text="锁付曲线图保存" />
- <Grid
- Grid.Row="10"
- Grid.Column="1"
- Grid.ColumnSpan="2"
- Margin="0,6,0,6">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="12" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <CheckBox
- Grid.Column="0"
- VerticalAlignment="Center"
- Content="启用保存锁付曲线图"
- FontSize="{DynamicResource Font.Size.Body3}"
- IsChecked="{Binding IsSaveScrewCurve, Mode=TwoWay}" />
- <TextBox
- Grid.Column="2"
- MinWidth="260"
- VerticalAlignment="Center"
- IsEnabled="{Binding IsSaveScrewCurve}"
- Text="{Binding ScrewCurvePath, Mode=TwoWay}" />
- <Button
- Grid.Column="3"
- Margin="8,0,0,0"
- VerticalAlignment="Center"
- Command="{Binding BrowseScrewCurvePathCommand}"
- IsEnabled="{Binding IsSaveScrewCurve}"
- Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}">
- <materialDesign:PackIcon Kind="FolderOpen" />
- </Button>
- </Grid>
- <!-- 扫码流程设置 -->
- <TextBlock
- Grid.Row="11"
- Grid.Column="0"
- Margin="0,8,12,8"
- VerticalAlignment="Top"
- Text="扫码流程设置" />
- <StackPanel
- Grid.Row="11"
- Grid.Column="1"
- Grid.ColumnSpan="2"
- Margin="0,6,0,0"
- Orientation="Vertical">
- <WrapPanel Margin="0,0,0,8">
- <CheckBox
- Margin="0,0,20,8"
- Content="是否启用最后一次拍照关闭光源"
- FontSize="{DynamicResource Font.Size.Body3}"
- IsChecked="{Binding IsBasePartOpenLight, Mode=TwoWay}" />
- <CheckBox
- Margin="0,0,20,8"
- Content="是否启用KB复检"
- FontSize="{DynamicResource Font.Size.Body3}"
- IsChecked="{Binding IsBasePartOpenLightKB, Mode=TwoWay}" />
- <CheckBox
- Margin="0,0,20,8"
- Content="是否MES结果为1"
- FontSize="{DynamicResource Font.Size.Body3}"
- IsChecked="{Binding IsMesResult, Mode=TwoWay}" />
- </WrapPanel>
- <WrapPanel Margin="0,0,0,8">
- <CheckBox
- Margin="0,0,20,8"
- Content="是否基于零件码获取流程码"
- FontSize="{DynamicResource Font.Size.Body3}"
- IsChecked="{Binding IsBasePartCodeGetSN, Mode=TwoWay}" />
- <CheckBox
- Margin="0,0,20,8"
- Content="是否通过零件码判断螺丝型号"
- FontSize="{DynamicResource Font.Size.Body3}"
- IsChecked="{Binding IsBasePartCodeChooseScrew, Mode=TwoWay}" />
- </WrapPanel>
- <TextBox
- Width="320"
- HorizontalAlignment="Left"
- materialDesign:HintAssist.Hint="螺丝型号匹配规则"
- BorderThickness="1"
- Text="{Binding ChooseScrewModel, Mode=TwoWay}"
- ToolTip="螺丝型号判断,如******123**,*为忽略字符" />
- </StackPanel>
- </Grid>
- <!-- 保存系统参数 -->
- <DockPanel Grid.Row="2" LastChildFill="False">
- <Button
- Height="40"
- MinWidth="150"
- HorizontalAlignment="Right"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SaveSystemParametersCommand}"
- DockPanel.Dock="Right"
- IsEnabled="{Binding IsAllowEdit}"
- Style="{StaticResource MaterialDesignRaisedButton}">
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <materialDesign:PackIcon Margin="0,0,6,0" Kind="ContentSaveCheck" />
- <TextBlock VerticalAlignment="Center" Text="{lex:Loc 保存系统参数}" />
- </StackPanel>
- </Button>
- </DockPanel>
- <StackPanel
- Grid.Row="5"
- Margin="0,12,0,0"
- Orientation="Horizontal">
- <!-- 刷卡参数配置 -->
- <GroupBox
- Width="280"
- Margin="0,0,50,0"
- HorizontalAlignment="Left"
- Header="刷卡器配置">
- <Grid Margin="10">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="PortName:" />
- <TextBox
- Grid.Row="0"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding CardReaderConfig.PortName, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="BaudRate:" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding CardReaderConfig.BaudRate, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="Parity:" />
- <ComboBox
- Grid.Row="2"
- Grid.Column="1"
- ItemsSource="{Binding Source={StaticResource Parity}}"
- SelectedItem="{Binding CardReaderConfig.Parity, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="StopBits:" />
- <ComboBox
- Grid.Row="3"
- Grid.Column="1"
- ItemsSource="{Binding Source={StaticResource StopBits}}"
- SelectedItem="{Binding CardReaderConfig.StopBits, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="DataBits:" />
- <TextBox
- Grid.Row="4"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding CardReaderConfig.DataBits, Mode=TwoWay}" />
- <Button
- Grid.Row="5"
- Grid.Column="1"
- MinWidth="120"
- Margin="0,6"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SaveCardReaderConfigCommand}"
- Style="{StaticResource MaterialDesignRaisedButton}">
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <materialDesign:PackIcon Margin="0,0,6,0" Kind="ContentSaveCheck" />
- <TextBlock VerticalAlignment="Center" Text="保存刷卡器配置" />
- </StackPanel>
- </Button>
- </Grid>
- </GroupBox>
- <GroupBox Width="280" Header="扭力测量仪配置">
- <Grid Margin="10">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="PortName:" />
- <TextBox
- Grid.Row="0"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding TorqueReadConfig.PortName, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="BaudRate:" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding TorqueReadConfig.BaudRate, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="Parity:" />
- <ComboBox
- Grid.Row="2"
- Grid.Column="1"
- ItemsSource="{Binding Source={StaticResource Parity}}"
- SelectedItem="{Binding TorqueReadConfig.Parity, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="StopBits:" />
- <ComboBox
- Grid.Row="3"
- Grid.Column="1"
- ItemsSource="{Binding Source={StaticResource StopBits}}"
- SelectedItem="{Binding TorqueReadConfig.StopBits, Mode=TwoWay}" />
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Text="DataBits:" />
- <TextBox
- Grid.Row="4"
- Grid.Column="1"
- Margin="6,0"
- Text="{Binding TorqueReadConfig.DataBits, Mode=TwoWay}" />
- <Button
- Grid.Row="5"
- Grid.Column="1"
- MinWidth="120"
- Margin="0,6"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SaveTorqueReaderConfigCommand}"
- Style="{StaticResource MaterialDesignRaisedButton}">
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <materialDesign:PackIcon Margin="0,0,6,0" Kind="ContentSaveCheck" />
- <TextBlock VerticalAlignment="Center" Text="保存扭力测量仪配置" />
- </StackPanel>
- </Button>
- </Grid>
- </GroupBox>
- </StackPanel>
- </Grid>
- </StackPanel>
- </TabItem>
- <!-- 产品信息 -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="BallotOutline" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="产品信息" />
- </StackPanel>
- </TabItem.Header>
- <StackPanel Margin="16">
- <GroupBox
- Width="400"
- Margin="10,5"
- HorizontalAlignment="Left"
- FontSize="{DynamicResource Font.Size.Title4}"
- Header="产品与mes参数绑定设置">
- <Grid Margin="20">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height=" auto" />
- <RowDefinition Height=" auto" />
- <RowDefinition Height=" auto" />
- <RowDefinition Height=" auto" />
- <RowDefinition Height=" auto" />
- </Grid.RowDefinitions>
- <TextBlock
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="产品名称:" />
- <ComboBox
- x:Name="selectProduct"
- Grid.Column="1"
- Width="100"
- Margin="10,4"
- HorizontalAlignment="Left"
- materialDesign:HintAssist.Hint="{lex:Loc 选择产品}"
- FontSize="14"
- ItemsSource="{Binding ProductList, Mode=TwoWay}"
- SelectedItem="{Binding SelectProduct, Mode=TwoWay}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="CubeOutline" />
- <TextBlock Text="{Binding Name}" />
- </StackPanel>
- <TextBlock
- MinHeight="0"
- MaxWidth="300"
- FontSize="{DynamicResource Font.Size.Captions4}"
- Foreground="Gray"
- Text="{Binding Description}"
- TextTrimming="CharacterEllipsis"
- TextWrapping="Wrap" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <TextBlock
- Grid.Row="1"
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="产品编码(model):" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- MinWidth="100"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="ProMesInfo.ProductCode" />
- </TextBox.Text>
- </TextBox>
- <TextBlock
- Grid.Row="2"
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="产品颜色:" />
- <TextBox
- Grid.Row="2"
- Grid.Column="1"
- MinWidth="100"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="ProMesInfo.ProductColor" />
- </TextBox.Text>
- </TextBox>
- <TextBlock
- Grid.Row="3"
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="产品类型:" />
- <TextBox
- Grid.Row="3"
- Grid.Column="1"
- MinWidth="100"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="ProMesInfo.ProductLoadMode" />
- </TextBox.Text>
- </TextBox>
- <StackPanel
- Grid.Row="6"
- Grid.ColumnSpan="2"
- Margin="0,6"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <Button
- MinWidth="100"
- Margin="5"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding GetProWithMesCommand}"
- Style="{StaticResource MaterialDesignRaisedButton}">
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <materialDesign:PackIcon Margin="0,0,6,0" Kind="PuzzleEditOutline" />
- <TextBlock VerticalAlignment="Center" Text="获取" />
- </StackPanel>
- </Button>
- <Button
- MinWidth="100"
- Margin="5"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding DeleteProWithMesCommand}"
- Style="{StaticResource MaterialDesignRaisedButton}">
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <materialDesign:PackIcon Margin="0,0,6,0" Kind="DeleteForeverOutline" />
- <TextBlock VerticalAlignment="Center" Text="删除" />
- </StackPanel>
- </Button>
- <Button
- MinWidth="100"
- Margin="5"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SaveProWithMesCommand}"
- Style="{StaticResource MaterialDesignRaisedButton}">
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <materialDesign:PackIcon Margin="0,0,6,0" Kind="ContentSaveCheck" />
- <TextBlock VerticalAlignment="Center" Text="保存" />
- </StackPanel>
- </Button>
- </StackPanel>
- </Grid>
- </GroupBox>
- </StackPanel>
- </TabItem>
- <!-- 生产排班 -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="LanConnect" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="{lex:Loc 生产排班}" />
- </StackPanel>
- </TabItem.Header>
- <StackPanel Margin="16">
- <Button
- Width="60"
- Margin="10"
- HorizontalAlignment="Left"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SaveWorkShiftCommand}"
- CommandParameter="WorkShift"
- Style="{StaticResource MaterialDesignRaisedButton}"
- ToolTip="{lex:Loc 保存}">
- <materialDesign:PackIcon Kind="ContentSaveCheck" />
- </Button>
- <GroupBox
- Width="320"
- Margin="10,5"
- HorizontalAlignment="Left"
- FontSize="{DynamicResource Font.Size.Title4}"
- Header="白夜班时间设置">
- <Grid Margin="20">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height=" auto" />
- <RowDefinition Height=" auto" />
- <RowDefinition Height=" auto" />
- </Grid.RowDefinitions>
- <TextBlock
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="白班开始时间:" />
- <TextBox
- Grid.Row="0"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="WorkShifts.DayShift" />
- </TextBox.Text>
- </TextBox>
- <TextBlock
- Grid.Row="1"
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="白班结束时间:" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="WorkShifts.DayShift" />
- </TextBox.Text>
- </TextBox>
- <StackPanel
- Grid.RowSpan="2"
- Grid.Column="2"
- Margin="10,5"
- HorizontalAlignment="Center">
- <ToggleButton
- Width="60"
- Height="40"
- Margin="0,10" />
- </StackPanel>
- <!-- 结束符 -->
- <TextBlock
- Grid.Row="2"
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="夜班开始时间:" />
- <TextBox
- Grid.Row="2"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="WorkShifts.NightShift" />
- </TextBox.Text>
- </TextBox>
- <TextBlock
- Grid.Row="3"
- Margin="0,0,0,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- Text="夜班结束时间:" />
- <TextBox
- Grid.Row="3"
- Grid.Column="1"
- MinWidth="80"
- Margin="10,4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="{DynamicResource Font.Size.Body3}"
- TextAlignment="Center">
- <TextBox.Text>
- <Binding Mode="TwoWay" Path="WorkShifts.NightShift" />
- </TextBox.Text>
- </TextBox>
- <ToggleButton
- Grid.Row="2"
- Grid.RowSpan="2"
- Grid.Column="2"
- Width="60"
- Height="40"
- Margin="10,5"
- HorizontalAlignment="Center" />
- </Grid>
- </GroupBox>
- <!--<Button Style="{StaticResource MaterialDesignRaisedButton}"
- materialDesign:ButtonAssist.CornerRadius="10"
- Width="60"
- Margin="10"
- Content="test"
- HorizontalAlignment="Left"
- Command="{Binding testCommand}">
- </Button>-->
- </StackPanel>
- </TabItem>
- <!-- 字体 -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="FontSize" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="{lex:Loc 字体}" />
- </StackPanel>
- </TabItem.Header>
- <ScrollViewer>
- <Grid Margin="20">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Grid.Resources>
- <Style TargetType="TextBlock">
- <Setter Property="FontSize" Value="{DynamicResource Font.Size.Body2}" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="HorizontalAlignment" Value="Right" />
- </Style>
- <Style TargetType="mah:NumericUpDown">
- <Setter Property="FontSize" Value="{DynamicResource Font.Size.Body2}" />
- <Setter Property="Margin" Value="5,2" />
- <Setter Property="MinWidth" Value="100" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Minimum" Value="6" />
- <Setter Property="Interval" Value="2" />
- <Setter Property="Maximum" Value="62" />
- <Setter Property="StringFormat" Value="{}{0:N0}" />
- </Style>
- </Grid.Resources>
- <!-- 1 -->
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- Text="{lex:Loc 标题,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}1: '}" />
- <mah:NumericUpDown
- Grid.Row="0"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Title1, Mode=TwoWay}" />
- <!-- 2 -->
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- Text="{lex:Loc 标题,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}2: '}" />
- <mah:NumericUpDown
- Grid.Row="1"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Title2, Mode=TwoWay}" />
- <!-- 3 -->
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- Text="{lex:Loc 标题,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}3: '}" />
- <mah:NumericUpDown
- Grid.Row="2"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Title3, Mode=TwoWay}" />
- <!-- 4 -->
- <TextBlock
- Grid.Row="3"
- Grid.Column="0"
- Text="{lex:Loc 标题,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}4: '}" />
- <mah:NumericUpDown
- Grid.Row="3"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Title4, Mode=TwoWay}" />
- <!-- 5 -->
- <TextBlock
- Grid.Row="4"
- Grid.Column="0"
- Text="{lex:Loc 正文,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}1: '}" />
- <mah:NumericUpDown
- Grid.Row="4"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Body1, Mode=TwoWay}" />
- <!-- 6 -->
- <TextBlock
- Grid.Row="5"
- Grid.Column="0"
- Text="{lex:Loc 正文,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}2: '}" />
- <mah:NumericUpDown
- Grid.Row="5"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Body2, Mode=TwoWay}" />
- <!-- 7 -->
- <TextBlock
- Grid.Row="6"
- Grid.Column="0"
- Text="{lex:Loc 正文,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}3: '}" />
- <mah:NumericUpDown
- Grid.Row="6"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Body3, Mode=TwoWay}" />
- <!-- 8 -->
- <TextBlock
- Grid.Row="7"
- Grid.Column="0"
- Text="{lex:Loc 正文,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}4: '}" />
- <mah:NumericUpDown
- Grid.Row="7"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Body4, Mode=TwoWay}" />
- <!-- 9 -->
- <TextBlock
- Grid.Row="8"
- Grid.Column="0"
- Text="{lex:Loc 标注,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}1: '}" />
- <mah:NumericUpDown
- Grid.Row="8"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Captions1, Mode=TwoWay}" />
- <!-- 10 -->
- <TextBlock
- Grid.Row="9"
- Grid.Column="0"
- Text="{lex:Loc 标注,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}2: '}" />
- <mah:NumericUpDown
- Grid.Row="9"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Captions2, Mode=TwoWay}" />
- <!-- 11 -->
- <TextBlock
- Grid.Row="10"
- Grid.Column="0"
- Text="{lex:Loc 标注,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}3: '}" />
- <mah:NumericUpDown
- Grid.Row="10"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Captions3, Mode=TwoWay}" />
- <!-- 12 -->
- <TextBlock
- Grid.Row="11"
- Grid.Column="0"
- Text="{lex:Loc 标注,
- Converter={StaticResource StringFormatConverter},
- ConverterParameter='{}{0}4: '}" />
- <mah:NumericUpDown
- Grid.Row="11"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Font Size"
- Value="{Binding Captions4, Mode=TwoWay}" />
- </Grid>
- </ScrollViewer>
- </TabItem>
- <!-- 语言 -->
- <TabItem>
- <TabItem.Header>
- <StackPanel HorizontalAlignment="Stretch">
- <materialDesign:PackIcon
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- Kind="TranslateVariant" />
- <TextBlock
- HorizontalAlignment="Stretch"
- FontSize="{DynamicResource Font.Size.Body2}"
- Style="{StaticResource TabHeaderTextBlockStyle}"
- Text="{lex:Loc SettingView_Language_Text}" />
- </StackPanel>
- </TabItem.Header>
- <StackPanel
- Margin="20"
- VerticalAlignment="Top"
- Orientation="Horizontal">
- <!-- 中文简体 -->
- <Button
- MinWidth="100"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SelectLanguageCommand}"
- CommandParameter="ChineseSimplified"
- FontSize="{DynamicResource Font.Size.Body1}"
- ToolTip="{lex:Loc SettingView_Language_ChineseSimplified}">
- <TextBlock Text="{lex:Loc SettingView_Language_ChineseSimplified}" />
- <Button.Style>
- <Style BasedOn="{StaticResource MaterialDesignRaisedButton}" TargetType="Button">
- <Setter Property="Foreground" Value="#000000" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding CurrentLanguage}" Value="{x:Static enums:Language.ChineseSimplified}">
- <Setter Property="Background" Value="Green" />
- <Setter Property="BorderBrush" Value="Green" />
- </DataTrigger>
- <!--<DataTrigger Binding="{Binding management.CurrentLanguage}"
- Value="{x:Static enums:Language.English}">
- <Setter Property="Background"
- Value="#e4ff54" />
- <Setter Property="BorderBrush"
- Value="#e4ff54" />
- </DataTrigger>-->
- </Style.Triggers>
- </Style>
- </Button.Style>
- </Button>
- <!-- 中文繁体 -->
- <Button
- MinWidth="100"
- Margin="20.0"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SelectLanguageCommand}"
- CommandParameter="ChineseTraditional"
- FontSize="{DynamicResource Font.Size.Body1}"
- ToolTip="{lex:Loc SettingView_Language_ChineseTraditional}">
- <TextBlock Text="{lex:Loc SettingView_Language_ChineseTraditional}" />
- <Button.Style>
- <Style BasedOn="{StaticResource MaterialDesignRaisedButton}" TargetType="Button">
- <Setter Property="Foreground" Value="#000000" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding CurrentLanguage}" Value="{x:Static enums:Language.ChineseTraditional}">
- <Setter Property="Background" Value="Green" />
- <Setter Property="BorderBrush" Value="Green" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Button.Style>
- </Button>
- <!-- 英语 -->
- <Button
- MinWidth="100"
- Margin="20.0"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SelectLanguageCommand}"
- CommandParameter="English"
- FontSize="{DynamicResource Font.Size.Body1}"
- ToolTip="{lex:Loc SettingView_Language_English}">
- <TextBlock Text="{lex:Loc SettingView_Language_English}" />
- <Button.Style>
- <Style BasedOn="{StaticResource MaterialDesignRaisedButton}" TargetType="Button">
- <Setter Property="Foreground" Value="#000000" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding CurrentLanguage}" Value="{x:Static enums:Language.English}">
- <Setter Property="Background" Value="Green" />
- <Setter Property="BorderBrush" Value="Green" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Button.Style>
- </Button>
- <!-- 日语 -->
- <Button
- MinWidth="100"
- Margin="20.0"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SelectLanguageCommand}"
- CommandParameter="Japanese"
- FontSize="{DynamicResource Font.Size.Body1}"
- ToolTip="{lex:Loc SettingView_Language_Japanese}">
- <TextBlock Text="{lex:Loc SettingView_Language_Japanese}" />
- <Button.Style>
- <Style BasedOn="{StaticResource MaterialDesignRaisedButton}" TargetType="Button">
- <Setter Property="Foreground" Value="#000000" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding CurrentLanguage}" Value="{x:Static enums:Language.Japanese}">
- <Setter Property="Background" Value="Green" />
- <Setter Property="BorderBrush" Value="Green" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Button.Style>
- </Button>
- <!-- 越南语 -->
- <Button
- MinWidth="100"
- Margin="20.0"
- materialDesign:ButtonAssist.CornerRadius="10"
- Command="{Binding SelectLanguageCommand}"
- CommandParameter="Vietnamese"
- FontSize="{DynamicResource Font.Size.Body1}"
- ToolTip="{lex:Loc SettingView_Language_Vietnamese}">
- <TextBlock Text="{lex:Loc SettingView_Language_Vietnamese}" />
- <Button.Style>
- <Style BasedOn="{StaticResource MaterialDesignRaisedButton}" TargetType="Button">
- <Setter Property="Foreground" Value="#000000" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding CurrentLanguage}" Value="{x:Static enums:Language.Vietnamese}">
- <Setter Property="Background" Value="Green" />
- <Setter Property="BorderBrush" Value="Green" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Button.Style>
- </Button>
- </StackPanel>
- </TabItem>
- </TabControl>
- </Grid>
- </UserControl>
|